GNU libmicrohttpd
0.9.29
|
#include </builddir/build/BUILD/libmicrohttpd-0.9.33/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 885 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 977 of file internal.h.
Referenced by internal_add_connection(), and MHD_start_daemon_va().
void* MHD_Daemon::apc_cls |
Closure argument to apc.
Definition at line 982 of file internal.h.
Referenced by internal_add_connection(), and MHD_start_daemon_va().
pthread_mutex_t MHD_Daemon::cleanup_connection_mutex |
Mutex for (modifying) access to the "cleanup" connection DLL.
Definition at line 1080 of file internal.h.
Referenced by cleanup_connection(), close_all_connections(), internal_add_connection(), MHD_cleanup_connections(), MHD_resume_connection(), MHD_set_connection_option(), MHD_start_daemon_va(), MHD_stop_daemon(), MHD_suspend_connection(), resume_suspended_connections(), and update_last_activity().
struct MHD_Connection* MHD_Daemon::cleanup_head |
Head of doubly-linked list of connections to clean up.
Definition at line 921 of file internal.h.
Referenced by cleanup_connection(), close_connection(), and MHD_cleanup_connections().
struct MHD_Connection* MHD_Daemon::cleanup_tail |
Tail of doubly-linked list of connections to clean up.
Definition at line 926 of file internal.h.
Referenced by cleanup_connection(), close_connection(), and MHD_cleanup_connections().
unsigned int MHD_Daemon::connection_timeout |
After how many seconds of inactivity should connections time out? Zero for no timeout.
Definition at line 1127 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_add_connection(), MHD_handle_connection(), MHD_set_connection_option(), MHD_start_daemon_va(), MHD_suspend_connection(), parse_options_va(), resume_suspended_connections(), and update_last_activity().
struct MHD_Connection* MHD_Daemon::connections_head |
Head of doubly-linked list of our current, active connections.
Definition at line 901 of file internal.h.
Referenced by cleanup_connection(), close_all_connections(), close_connection(), internal_add_connection(), MHD_get_fdset(), MHD_run_from_select(), MHD_suspend_connection(), and resume_suspended_connections().
struct MHD_Connection* MHD_Daemon::connections_tail |
Tail of doubly-linked list of our current, active connections.
Definition at line 906 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_add_connection(), MHD_suspend_connection(), and resume_suspended_connections().
MHD_AccessHandlerCallback MHD_Daemon::default_handler |
Callback function for all requests.
Definition at line 891 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 896 of file internal.h.
Referenced by MHD_start_daemon_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.
Definition at line 965 of file internal.h.
Referenced by cleanup_connection(), close_connection(), MHD_get_timeout(), MHD_set_connection_option(), MHD_suspend_connection(), 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.
Definition at line 971 of file internal.h.
Referenced by cleanup_connection(), close_connection(), MHD_set_connection_option(), MHD_suspend_connection(), and resume_suspended_connections().
struct MHD_Daemon* MHD_Daemon::master |
Pointer to master daemon (NULL if this is the master)
Definition at line 1035 of file internal.h.
Referenced by MHD_get_master(), and MHD_start_daemon_va().
unsigned int MHD_Daemon::max_connections |
Limit on the number of parallel connections.
Definition at line 1121 of file internal.h.
Referenced by internal_add_connection(), MHD_cleanup_connections(), MHD_select(), MHD_start_daemon_va(), and parse_options_va().
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' is set, they are moved to the 'manual_timeout_head'-XDLL.
Definition at line 952 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_add_connection(), MHD_get_timeout(), MHD_set_connection_option(), MHD_suspend_connection(), resume_suspended_connections(), and update_last_activity().
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).
Definition at line 958 of file internal.h.
Referenced by cleanup_connection(), close_connection(), internal_add_connection(), MHD_set_connection_option(), MHD_suspend_connection(), resume_suspended_connections(), and update_last_activity().
MHD_RequestCompletedCallback MHD_Daemon::notify_completed |
Function to call when we are done processing a particular request. May be NULL.
Definition at line 988 of file internal.h.
Referenced by MHD_connection_close(), MHD_connection_handle_idle(), and parse_options_va().
void* MHD_Daemon::notify_completed_cls |
Closure argument to notify_completed.
Definition at line 993 of file internal.h.
Referenced by MHD_connection_close(), MHD_connection_handle_idle(), and parse_options_va().
enum MHD_OPTION MHD_Daemon::options |
Daemon's options.
Definition at line 1138 of file internal.h.
Referenced by build_header_response(), cleanup_connection(), close_all_connections(), do_read(), do_write(), internal_add_connection(), make_nonblocking_noninheritable(), MHD_accept_connection(), MHD_cleanup_connections(), MHD_connection_close(), MHD_connection_update_event_loop_info(), MHD_get_fdset(), MHD_get_timeout(), MHD_handle_connection(), MHD_poll(), MHD_quiesce_daemon(), MHD_resume_connection(), MHD_run(), MHD_run_from_select(), MHD_select(), MHD_select_thread(), MHD_set_connection_option(), MHD_start_daemon_va(), MHD_stop_daemon(), MHD_suspend_connection(), parse_connection_headers(), parse_options_va(), resume_suspended_connections(), send_param_adapter(), try_ready_normal_body(), and update_last_activity().
void* MHD_Daemon::per_ip_connection_count |
Table storing number of connections per IP
Definition at line 1045 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 1133 of file internal.h.
Referenced by MHD_ip_limit_add(), MHD_ip_limit_del(), and parse_options_va().
pthread_mutex_t MHD_Daemon::per_ip_connection_mutex |
Mutex for per-IP connection counts.
Definition at line 1075 of file internal.h.
Referenced by MHD_ip_count_lock(), MHD_ip_count_unlock(), MHD_start_daemon_va(), and MHD_stop_daemon().
pthread_t MHD_Daemon::pid |
PID of the select thread (if we have internal select)
Definition at line 1070 of file internal.h.
Referenced by MHD_start_daemon_va(), and MHD_stop_daemon().
size_t MHD_Daemon::pool_increment |
Increment for growth of the per-connection memory pools.
Definition at line 1055 of file internal.h.
Referenced by MHD_connection_handle_read(), MHD_start_daemon_va(), and parse_options_va().
size_t MHD_Daemon::pool_size |
Size of the per-connection memory pools.
Definition at line 1050 of file internal.h.
Referenced by internal_add_connection(), MHD_start_daemon_va(), parse_options_va(), try_grow_read_buffer(), and try_ready_chunked_body().
uint16_t MHD_Daemon::port |
int MHD_Daemon::resuming |
Definition at line 1116 of file internal.h.
Referenced by MHD_resume_connection(), and resume_suspended_connections().
int MHD_Daemon::shutdown |
Are we shutting down?
Definition at line 1111 of file internal.h.
Referenced by MHD_get_fdset(), MHD_handle_connection(), MHD_poll(), MHD_run(), MHD_select(), MHD_select_thread(), and MHD_stop_daemon().
int MHD_Daemon::socket_fd |
Listen socket.
Definition at line 1085 of file internal.h.
Referenced by MHD_accept_connection(), MHD_get_daemon_info(), MHD_get_fdset(), MHD_quiesce_daemon(), MHD_run_from_select(), MHD_select(), MHD_start_daemon_va(), MHD_stop_daemon(), 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 911 of file internal.h.
Referenced by cleanup_connection(), MHD_suspend_connection(), 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 916 of file internal.h.
Referenced by cleanup_connection(), MHD_suspend_connection(), and resume_suspended_connections().
size_t MHD_Daemon::thread_stack_size |
Size of threads created by MHD.
Definition at line 1060 of file internal.h.
Referenced by create_thread(), and parse_options_va().
UnescapeCallback MHD_Daemon::unescape_callback |
Function to call when we unescape escape sequences.
Definition at line 1012 of file internal.h.
Referenced by check_argument_match(), MHD_start_daemon_va(), parse_arguments(), parse_initial_message_line(), and parse_options_va().
void* MHD_Daemon::unescape_callback_cls |
Closure for unescape callback.
Definition at line 1017 of file internal.h.
Referenced by check_argument_match(), parse_arguments(), parse_initial_message_line(), and parse_options_va().
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 1002 of file internal.h.
Referenced by parse_initial_message_line(), and parse_options_va().
void* MHD_Daemon::uri_log_callback_cls |
Closure argument to uri_log_callback.
Definition at line 1007 of file internal.h.
Referenced by parse_initial_message_line(), and parse_options_va().
struct MHD_Daemon* MHD_Daemon::worker_pool |
Worker daemons (one per thread)
Definition at line 1040 of file internal.h.
Referenced by internal_add_connection(), MHD_quiesce_daemon(), MHD_start_daemon_va(), and MHD_stop_daemon().
unsigned int MHD_Daemon::worker_pool_size |
Number of worker daemons
Definition at line 1065 of file internal.h.
Referenced by internal_add_connection(), MHD_quiesce_daemon(), MHD_start_daemon_va(), MHD_stop_daemon(), and parse_options_va().
int MHD_Daemon::wpipe[2] |
Pipe we use to signal shutdown, unless 'HAVE_LISTEN_SHUTDOWN' is defined AND we have a listen socket (which we can then 'shutdown' to stop listening). On W32 this is a socketpair, not a pipe.
Definition at line 1106 of file internal.h.
Referenced by internal_add_connection(), MHD_quiesce_daemon(), MHD_resume_connection(), MHD_run_from_select(), MHD_select(), MHD_start_daemon_va(), and MHD_stop_daemon().