GNU libmicrohttpd
0.9.72
|
functions to start a daemon More...
#include "internal.h"
#include "connection_cleanup.h"
#include "daemon_close_all_connections.h"
#include "daemon_select.h"
#include "daemon_poll.h"
#include "daemon_epoll.h"
#include "request_resume.h"
Go to the source code of this file.
Functions | |
static enum MHD_StatusCode | configure_listen_reuse (struct MHD_Daemon *daemon) |
static enum MHD_StatusCode | open_listen_socket (struct MHD_Daemon *daemon) |
static void | get_listen_port_number (struct MHD_Daemon *daemon) |
static MHD_THRD_RTRN_TYPE_ MHD_THRD_CALL_SPEC_ | MHD_polling_thread (void *cls) |
static enum MHD_StatusCode | setup_thread_pool (struct MHD_Daemon *daemon) |
enum MHD_StatusCode | MHD_daemon_start (struct MHD_Daemon *daemon) |
functions to start a daemon
Definition in file daemon_start.c.
|
static |
Set listen socket options to allow port rebinding (or not) depending on how MHD was configured.
[in,out] | daemon | the daemon with the listen socket to configure |
Definition at line 1 of file daemon_start.c.
References _, MHD_Daemon::allow_address_reuse, MHD_Daemon::listen_socket, and MHD_socket_last_strerr_.
|
static |
Obtain the listen port number from the socket (if it was not explicitly set by us, i.e. if we were given a listen socket or if the port was 0 and the OS picked a free one).
[in,out] | daemon | daemon to obtain the port number for |
Definition at line 422 of file daemon_start.c.
References _, MHD_Daemon::listen_port, MHD_Daemon::listen_socket, MHD_INVALID_SOCKET, and MHD_socket_last_strerr_.
|
static |
Thread that runs the polling loop until the daemon is explicitly shut down.
cls | struct MHD_Deamon to run select loop in a thread for |
Definition at line 619 of file daemon_start.c.
Referenced by MHD_start_daemon_va().
|
static |
Open, configure and bind the listen socket (if required).
[in,out] | daemon | daemon to open the socket for |
Definition at line 1 of file daemon_start.c.
|
static |
Setup the thread pool (if needed).
[in,out] | daemon | daemon to setup thread pool for |
Definition at line 619 of file daemon_start.c.