GNU libmicrohttpd 1.0.2
|
#include </builddir/build/BUILD/libmicrohttpd-1.0.2-build/libmicrohttpd-1.0.2/src/microhttpd/internal.h>
State kept for each MHD daemon. All connections are kept in two doubly-linked lists. The first one reflects the state of the connection in terms of what operations we are waiting for (read, write, locally blocked, cleanup) whereas the second is about its timeout state (default or custom).
Definition at line 1861 of file internal.h.
MHD_AcceptPolicyCallback MHD_Daemon::apc |
Function to call to check if we should accept or reject an incoming request. May be NULL.
Definition at line 2021 of file internal.h.
Referenced by MHD_start_daemon(), MHD_start_daemon_va(), and new_connection_prepare_().
void* MHD_Daemon::apc_cls |
Closure argument to apc.
Definition at line 2026 of file internal.h.
Referenced by MHD_start_daemon(), MHD_start_daemon_va(), and new_connection_prepare_().
bool MHD_Daemon::at_limit |
Did we hit some system or process-wide resource limit while trying to accept() the last time? If so, we don't accept new connections until we close an existing one. This effectively temporarily lowers the "connection_limit" to the current number of connections.
Definition at line 2219 of file internal.h.
Referenced by internal_get_fdset2(), MHD_accept_connection(), MHD_cleanup_connections(), and MHD_select().
struct MHD_Connection* MHD_Daemon::cleanup_head |
Head of doubly-linked list of connections to clean up.
Definition at line 1915 of file internal.h.
Referenced by cleanup_connection(), close_connection(), MHD_cleanup_connections(), MHD_get_timeout64(), MHD_stop_daemon(), and resume_suspended_connections().
struct MHD_Connection* MHD_Daemon::cleanup_tail |
Tail of doubly-linked list of connections to clean up.
Definition at line 1920 of file internal.h.
Referenced by cleanup_connection(), close_connection(), MHD_cleanup_connections(), and resume_suspended_connections().
int MHD_Daemon::client_discipline |
The strictness level for parsing of incoming data.
Definition at line 2265 of file internal.h.
Referenced by get_req_header(), get_request_line(), get_request_line_inner(), MHD_start_daemon_va(), parse_connection_headers(), parse_options_va(), process_request_body(), and unescape_wrapper().
unsigned int MHD_Daemon::connection_limit |
Limit on the number of parallel connections.
Definition at line 2246 of file internal.h.
Referenced by internal_get_fdset2(), MHD_add_connection(), MHD_select(), MHD_start_daemon_va(), new_connection_prepare_(), new_connection_process_(), and parse_options_va().
uint64_t MHD_Daemon::connection_timeout_ms |
After how many milliseconds of inactivity should this connection time out? Zero for no timeout.
Definition at line 2253 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_suspend_connection_(), MHD_set_connection_option(), MHD_start_daemon_va(), MHD_update_last_activity_(), new_connection_prepare_(), parse_options_va(), and resume_suspended_connections().
unsigned int MHD_Daemon::connections |
Number of active parallel connections.
Definition at line 2131 of file internal.h.
Referenced by internal_get_fdset2(), MHD_accept_connection(), MHD_add_connection(), MHD_cleanup_connections(), MHD_get_daemon_info(), MHD_select(), MHD_start_daemon_va(), new_connection_prepare_(), and new_connection_process_().
struct MHD_Connection* MHD_Daemon::connections_head |
Head of doubly-linked list of our current, active connections.
Definition at line 1895 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_suspend_connection_(), MHD_stop_daemon(), new_connection_process_(), and resume_suspended_connections().
struct MHD_Connection* MHD_Daemon::connections_tail |
Tail of doubly-linked list of our current, active connections.
Definition at line 1900 of file internal.h.
Referenced by cleanup_connection(), close_all_connections(), close_connection(), internal_get_fdset2(), internal_run_from_select(), internal_suspend_connection_(), new_connection_process_(), and resume_suspended_connections().
union MHD_DaemonInfo MHD_Daemon::daemon_info_dummy_flags |
The value to be returned by MHD_get_daemon_info()
Definition at line 2477 of file internal.h.
Referenced by MHD_get_daemon_info().
union MHD_DaemonInfo MHD_Daemon::daemon_info_dummy_listen_fd |
The value to be returned by MHD_get_daemon_info()
Definition at line 2460 of file internal.h.
Referenced by MHD_get_daemon_info().
union MHD_DaemonInfo MHD_Daemon::daemon_info_dummy_num_connections |
The value to be returned by MHD_get_daemon_info()
Definition at line 2472 of file internal.h.
Referenced by MHD_get_daemon_info().
union MHD_DaemonInfo MHD_Daemon::daemon_info_dummy_port |
The value to be returned by MHD_get_daemon_info()
Definition at line 2482 of file internal.h.
Referenced by MHD_get_daemon_info().
bool MHD_Daemon::data_already_pending |
'True' if some data is already waiting to be processed. If set to 'true' - zero timeout for select()/poll*() is used. Should be reset each time before processing connections and raised by any connection which require additional immediately processing (application does not provide data for response, data waiting in TLS buffers etc.)
Definition at line 2241 of file internal.h.
Referenced by call_handlers(), close_connection(), internal_run_from_select(), MHD_get_timeout64(), and resume_suspended_connections().
MHD_AccessHandlerCallback MHD_Daemon::default_handler |
Callback function for all requests.
Definition at line 1867 of file internal.h.
Referenced by call_connection_handler(), MHD_start_daemon_va(), and process_request_body().
void* MHD_Daemon::default_handler_cls |
Closure argument to default_handler.
Definition at line 1872 of file internal.h.
Referenced by call_connection_handler(), MHD_start_daemon_va(), and process_request_body().
volatile bool MHD_Daemon::have_new |
Indicate that new connections in new_connections_head list need to be processed.
Definition at line 2230 of file internal.h.
Referenced by internal_add_connection(), internal_run_from_select(), MHD_get_timeout64(), and new_connections_list_process_().
enum MHD_DisableSanityCheck MHD_Daemon::insanity_level |
Our MHD_OPTION_SERVER_INSANITY level, bits indicating which sanity checks are off.
Definition at line 2180 of file internal.h.
Referenced by parse_options_va().
struct MHD_itc_ MHD_Daemon::itc |
Inter-thread communication channel (also used to unblock select() in non-threaded code).
Definition at line 2198 of file internal.h.
Referenced by cleanup_connection(), close_all_connections(), internal_add_connection(), internal_get_fdset2(), internal_run_from_select(), MHD_quiesce_daemon(), MHD_resume_connection(), MHD_select(), MHD_start_daemon_va(), MHD_stop_daemon(), and resume_suspended_connections().
unsigned int MHD_Daemon::listen_backlog_size |
The size of queue for listen socket.
Definition at line 2454 of file internal.h.
Referenced by MHD_start_daemon_va(), and parse_options_va().
MHD_socket MHD_Daemon::listen_fd |
Listen socket.
Definition at line 2106 of file internal.h.
Referenced by internal_get_fdset2(), internal_run_from_select(), MHD_accept_connection(), MHD_get_daemon_info(), MHD_quiesce_daemon(), MHD_select(), MHD_start_daemon_va(), MHD_stop_daemon(), and process_interim_params().
enum MHD_tristate MHD_Daemon::listen_is_unix |
_MHD_YES if the listen_fd socket is a UNIX domain socket.
Definition at line 1925 of file internal.h.
Referenced by MHD_accept_connection(), MHD_start_daemon_va(), and process_interim_params().
bool MHD_Daemon::listen_nonblk |
Listen socket is non-blocking.
Definition at line 2111 of file internal.h.
Referenced by internal_run_from_select(), MHD_accept_connection(), and MHD_start_daemon_va().
int MHD_Daemon::listening_address_reuse |
Whether to allow/disallow/ignore reuse of listening address. The semantics is the following: 0: ignore (user did not ask for neither allow/disallow, use SO_REUSEADDR except W32) >0: allow (use SO_REUSEPORT on most platforms, SO_REUSEADDR on Windows) <0: disallow (mostly no action, SO_EXCLUSIVEADDRUSE on Windows or SO_EXCLBIND on Solaris)
Definition at line 2191 of file internal.h.
Referenced by MHD_start_daemon_va(), and parse_options_va().
struct MHD_Connection* MHD_Daemon::manual_timeout_head |
Head of the XDLL of ALL connections with a non-default/custom timeout, unsorted. MHD will do a O(n) scan over this list to determine the current timeout. Not used in MHD_USE_THREAD_PER_CONNECTION mode.
Definition at line 2008 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_suspend_connection_(), MHD_set_connection_option(), and resume_suspended_connections().
struct MHD_Connection* MHD_Daemon::manual_timeout_tail |
Tail of the XDLL of ALL connections with a non-default/custom timeout, unsorted. Not used in MHD_USE_THREAD_PER_CONNECTION mode.
Definition at line 2015 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_suspend_connection_(), MHD_get_timeout64(), MHD_set_connection_option(), and resume_suspended_connections().
struct MHD_Daemon* MHD_Daemon::master |
Pointer to master daemon (NULL if this is the master)
Definition at line 2098 of file internal.h.
Referenced by MHD_get_master(), MHD_ip_count_lock(), MHD_ip_count_unlock(), MHD_start_daemon_va(), and MHD_stop_daemon().
struct MHD_Connection* MHD_Daemon::new_connections_head |
Head of doubly-linked list of new, externally added connections.
Definition at line 1885 of file internal.h.
Referenced by close_all_connections(), internal_add_connection(), MHD_stop_daemon(), and new_connections_list_process_().
struct MHD_Connection* MHD_Daemon::new_connections_tail |
Tail of doubly-linked list of new, externally added connections.
Definition at line 1890 of file internal.h.
Referenced by close_all_connections(), internal_add_connection(), and new_connections_list_process_().
struct MHD_Connection* MHD_Daemon::normal_timeout_head |
Head of the XDLL of ALL connections with a default ('normal') timeout, sorted by timeout (earliest at the tail, most recently used connection at the head). MHD can just look at the tail of this list to determine the timeout for all of its elements; whenever there is an event of a connection, the connection is moved back to the tail of the list.
All connections by default start in this list; if a custom timeout that does not match connection_timeout_ms is set, they are moved to the manual_timeout_head-XDLL. Not used in MHD_USE_THREAD_PER_CONNECTION mode as each thread needs only one connection-specific timeout.
Definition at line 1993 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_suspend_connection_(), MHD_set_connection_option(), MHD_update_last_activity_(), new_connection_process_(), and resume_suspended_connections().
struct MHD_Connection* MHD_Daemon::normal_timeout_tail |
Tail of the XDLL of ALL connections with a default timeout, sorted by timeout (earliest timeout at the tail). Not used in MHD_USE_THREAD_PER_CONNECTION mode.
Definition at line 2000 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_suspend_connection_(), MHD_get_timeout64(), MHD_set_connection_option(), MHD_update_last_activity_(), new_connection_process_(), and resume_suspended_connections().
MHD_RequestCompletedCallback MHD_Daemon::notify_completed |
Function to call when we are done processing a particular request. May be NULL.
Definition at line 2032 of file internal.h.
Referenced by connection_reset(), MHD_connection_close_(), MHD_start_daemon_va(), parse_options_va(), and resume_suspended_connections().
void* MHD_Daemon::notify_completed_cls |
Closure argument to notify_completed.
Definition at line 2037 of file internal.h.
Referenced by connection_reset(), MHD_connection_close_(), parse_options_va(), and resume_suspended_connections().
MHD_NotifyConnectionCallback MHD_Daemon::notify_connection |
Function to call when we are starting/stopping a connection. May be NULL.
Definition at line 2043 of file internal.h.
Referenced by MHD_cleanup_connections(), MHD_start_daemon_va(), new_connection_process_(), and parse_options_va().
void* MHD_Daemon::notify_connection_cls |
Closure argument to notify_connection.
Definition at line 2048 of file internal.h.
Referenced by MHD_cleanup_connections(), new_connection_process_(), and parse_options_va().
enum MHD_FLAG MHD_Daemon::options |
Daemon's flags (bitfield).
Definition at line 1880 of file internal.h.
Referenced by build_header_response(), call_handlers(), close_all_connections(), internal_run_from_select(), MHD_add_connection(), MHD_connection_mark_closed_(), MHD_connection_set_initial_state_(), MHD_get_daemon_info(), MHD_queue_response(), MHD_quiesce_daemon(), MHD_resume_connection(), MHD_run_from_select2(), MHD_select(), MHD_send_data_(), MHD_send_hdr_and_body_(), MHD_send_iovec_(), MHD_start_daemon_va(), MHD_stop_daemon(), MHD_suspend_connection(), new_connection_prepare_(), new_connection_process_(), parse_options_va(), process_interim_params(), and resume_suspended_connections().
void* MHD_Daemon::per_ip_connection_count |
Table storing number of connections per IP
Definition at line 2123 of file internal.h.
Referenced by MHD_ip_limit_add(), and MHD_ip_limit_del().
unsigned int MHD_Daemon::per_ip_connection_limit |
Maximum number of connections per IP, or 0 for unlimited.
Definition at line 2259 of file internal.h.
Referenced by MHD_ip_limit_add(), MHD_ip_limit_del(), and parse_options_va().
size_t MHD_Daemon::pool_increment |
Increment for growth of the per-connection memory pools.
Definition at line 2141 of file internal.h.
Referenced by check_and_grow_read_buffer_space(), MHD_start_daemon_va(), parse_options_va(), and try_grow_read_buffer().
size_t MHD_Daemon::pool_size |
Size of the per-connection memory pools.
Definition at line 2136 of file internal.h.
Referenced by connection_reset(), MHD_connection_set_initial_state_(), MHD_start_daemon_va(), new_connection_process_(), parse_options_va(), and send_redirect_fixed_rq_target().
uint16_t MHD_Daemon::port |
Listen port.
Definition at line 2080 of file internal.h.
Referenced by MHD_get_daemon_info(), MHD_start_daemon(), MHD_start_daemon_va(), and process_interim_params().
volatile bool MHD_Daemon::resuming |
Definition at line 2224 of file internal.h.
Referenced by close_all_connections(), MHD_get_timeout64(), MHD_resume_connection(), and resume_suspended_connections().
volatile bool MHD_Daemon::shutdown |
Are we shutting down?
Definition at line 2203 of file internal.h.
Referenced by close_all_connections(), internal_get_fdset2(), MHD_connection_mark_closed_(), MHD_get_fdset2(), MHD_get_timeout64(), MHD_queue_response(), MHD_run(), MHD_run_wait(), MHD_select(), MHD_stop_daemon(), and resume_suspended_connections().
bool MHD_Daemon::sigpipe_blocked |
True if SIGPIPE is blocked
Definition at line 2286 of file internal.h.
Referenced by MHD_accept_connection(), MHD_add_connection(), MHD_queue_response(), MHD_send_hdr_and_body_(), MHD_send_iovec_(), MHD_start_daemon_va(), and parse_options_va().
struct MHD_Connection* MHD_Daemon::suspended_connections_head |
Head of doubly-linked list of our current but suspended connections.
Definition at line 1905 of file internal.h.
Referenced by cleanup_connection(), close_all_connections(), internal_suspend_connection_(), MHD_stop_daemon(), and resume_suspended_connections().
struct MHD_Connection* MHD_Daemon::suspended_connections_tail |
Tail of doubly-linked list of our current but suspended connections.
Definition at line 1910 of file internal.h.
Referenced by cleanup_connection(), close_all_connections(), internal_suspend_connection_(), and resume_suspended_connections().
UnescapeCallback MHD_Daemon::unescape_callback |
Function to call when we unescape escape sequences.
Definition at line 2067 of file internal.h.
Referenced by check_uri_match(), MHD_parse_arguments_(), MHD_start_daemon_va(), parse_options_va(), and process_request_target().
void* MHD_Daemon::unescape_callback_cls |
Closure for unescape_callback.
Definition at line 2072 of file internal.h.
Referenced by check_uri_match(), MHD_parse_arguments_(), parse_options_va(), and process_request_target().
LogCallback MHD_Daemon::uri_log_callback |
Function to call with the full URI at the beginning of request processing. May be NULL.
Returns the initial pointer to internal state kept by the client for the request.
Definition at line 2057 of file internal.h.
Referenced by parse_options_va(), and process_request_target().
void* MHD_Daemon::uri_log_callback_cls |
Closure argument to uri_log_callback.
Definition at line 2062 of file internal.h.
Referenced by parse_options_va(), and process_request_target().
volatile bool MHD_Daemon::was_quiesced |
Has this daemon been quiesced via MHD_quiesce_daemon()? If so, we should no longer use the listen_fd (including removing it from the epoll_fd when possible).
Definition at line 2210 of file internal.h.
Referenced by internal_get_fdset2(), internal_run_from_select(), MHD_accept_connection(), MHD_quiesce_daemon(), MHD_select(), and MHD_stop_daemon().