GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
daemon_select.c File Reference

function to run select()-based event loop of a daemon More...

#include "internal.h"
#include "connection_add.h"
#include "connection_call_handlers.h"
#include "connection_cleanup.h"
#include "connection_finish_forward.h"
#include "daemon_select.h"
#include "daemon_epoll.h"
#include "request_resume.h"
#include "upgrade_process.h"
Include dependency graph for daemon_select.c:

Go to the source code of this file.

Functions

enum MHD_StatusCode MHD_daemon_get_fdset (struct MHD_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, MHD_socket *max_fd)
 
static enum MHD_StatusCode internal_get_fdset2 (struct MHD_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, MHD_socket *max_fd, unsigned int fd_setsize)
 
enum MHD_StatusCode MHD_daemon_get_fdset2 (struct MHD_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, MHD_socket *max_fd, unsigned int fd_setsize)
 
static enum MHD_StatusCode internal_run_from_select (struct MHD_Daemon *daemon, const fd_set *read_fd_set, const fd_set *write_fd_set, const fd_set *except_fd_set)
 
enum MHD_StatusCode MHD_daemon_run_from_select (struct MHD_Daemon *daemon, const fd_set *read_fd_set, const fd_set *write_fd_set, const fd_set *except_fd_set)
 
enum MHD_StatusCode MHD_daemon_select_ (struct MHD_Daemon *daemon, int may_block)
 

Detailed Description

function to run select()-based event loop of a daemon

Author
Christian Grothoff

Definition in file daemon_select.c.

Function Documentation

◆ MHD_daemon_select_()

enum MHD_StatusCode MHD_daemon_select_ ( struct MHD_Daemon daemon,
int  may_block 
)

Main internal select() call. Will compute select sets, call select() and then internal_run_from_select() with the result.

Parameters
daemondaemon to run select() loop for
may_blockMHD_YES if blocking, MHD_NO if non-blocking
Returns
#MHD_SC_OK on success

Definition at line 654 of file daemon_select.c.

References _, MHD_Daemon::at_limit, MHD_Daemon::connections, MHD_Daemon::disallow_suspend_resume, MHD_Daemon::global_connection_limit, internal_get_fdset2(), internal_run_from_select(), MHD_Daemon::itc, MHD_Daemon::listen_socket, MHD_add_to_fd_set_(), MHD_daemon_get_timeout(), MHD_INVALID_SOCKET, MHD_NO, MHD_resume_suspended_connections_(), MHD_SCKT_ERR_IS_EINTR_, MHD_socket_get_error_, MHD_socket_strerr_, MHD_SYS_select_, MHD_UNSIGNED_LONG_LONG, NULL, MHD_Daemon::shutdown, MHD_Daemon::threading_mode, TIMEVAL_TV_SEC_MAX, and MHD_Daemon::was_quiesced.

Referenced by MHD_daemon_run(), and MHD_polling_thread().

Here is the call graph for this function:
Here is the caller graph for this function: