MHD_Daemon Struct Reference

#include <internal.h>


Data Fields

MHD_AccessHandlerCallback default_handler
void * default_handler_cls
MHD_Connectionconnections_head
MHD_Connectionconnections_tail
MHD_Connectioncleanup_head
MHD_Connectioncleanup_tail
MHD_AcceptPolicyCallback apc
void * apc_cls
MHD_RequestCompletedCallback notify_completed
void * notify_completed_cls
LogCallback uri_log_callback
void * uri_log_callback_cls
UnescapeCallback unescape_callback
void * unescape_callback_cls
MHD_Daemonmaster
MHD_Daemonworker_pool
void * per_ip_connection_count
size_t pool_size
size_t thread_stack_size
unsigned int worker_pool_size
pthread_t pid
pthread_mutex_t per_ip_connection_mutex
pthread_mutex_t cleanup_connection_mutex
int socket_fd
int wpipe [2]
int shutdown
unsigned int max_connections
unsigned int connection_timeout
unsigned int per_ip_connection_limit
enum MHD_OPTION options
uint16_t port


Detailed Description

State kept for each MHD daemon.

Definition at line 782 of file internal.h.


Field Documentation

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 820 of file internal.h.

Referenced by MHD_add_connection(), and MHD_start_daemon_va().

void* MHD_Daemon::apc_cls

Closure argument to apc.

Definition at line 825 of file internal.h.

Referenced by MHD_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 918 of file internal.h.

Referenced by close_all_connections(), MHD_add_connection(), MHD_cleanup_connections(), and MHD_connection_handle_idle().

struct MHD_Connection* MHD_Daemon::cleanup_head

Tail of doubly-linked list of connections to clean up.

Definition at line 808 of file internal.h.

Referenced by close_all_connections(), MHD_cleanup_connections(), and MHD_connection_handle_idle().

struct MHD_Connection* MHD_Daemon::cleanup_tail

Tail of doubly-linked list of connections to clean up.

Definition at line 813 of file internal.h.

Referenced by close_all_connections(), MHD_cleanup_connections(), and MHD_connection_handle_idle().

unsigned int MHD_Daemon::connection_timeout

After how many seconds of inactivity should connections time out? Zero for no timeout.

Definition at line 946 of file internal.h.

Referenced by MHD_add_connection(), MHD_handle_connection(), MHD_start_daemon_va(), and parse_options_va().

struct MHD_Connection* MHD_Daemon::connections_head

Tail of doubly-linked list of our current, active connections.

Definition at line 798 of file internal.h.

Referenced by close_all_connections(), MHD_add_connection(), MHD_connection_handle_idle(), MHD_get_fdset(), and MHD_get_timeout().

struct MHD_Connection* MHD_Daemon::connections_tail

Tail of doubly-linked list of our current, active connections.

Definition at line 803 of file internal.h.

Referenced by close_all_connections(), MHD_add_connection(), and MHD_connection_handle_idle().

MHD_AccessHandlerCallback MHD_Daemon::default_handler

Callback function for all requests.

Definition at line 788 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 793 of file internal.h.

Referenced by MHD_start_daemon_va().

struct MHD_Daemon* MHD_Daemon::master

Pointer to master daemon (NULL if this is the master)

Definition at line 878 of file internal.h.

Referenced by MHD_get_master().

unsigned int MHD_Daemon::max_connections

Limit on the number of parallel connections.

Definition at line 940 of file internal.h.

Referenced by MHD_add_connection(), MHD_cleanup_connections(), MHD_start_daemon_va(), and parse_options_va().

MHD_RequestCompletedCallback MHD_Daemon::notify_completed

Function to call when we are done processing a particular request. May be NULL.

Definition at line 831 of file internal.h.

Referenced by MHD_connection_close(), and parse_options_va().

void* MHD_Daemon::notify_completed_cls

Closure argument to notify_completed.

Definition at line 836 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 957 of file internal.h.

Referenced by build_header_response(), close_all_connections(), do_read(), do_write(), MHD_add_connection(), MHD_cleanup_connections(), MHD_get_fdset(), MHD_get_timeout(), MHD_handle_connection(), MHD_poll(), MHD_run(), MHD_select(), MHD_select_thread(), MHD_start_daemon_va(), parse_connection_headers(), parse_options_va(), recv_param_adapter(), send_param_adapter(), and try_ready_normal_body().

void* MHD_Daemon::per_ip_connection_count

Table storing number of connections per IP

Definition at line 888 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 952 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 913 of file internal.h.

Referenced by MHD_ip_count_lock(), and MHD_ip_count_unlock().

pthread_t MHD_Daemon::pid

PID of the select thread (if we have internal select)

Definition at line 908 of file internal.h.

size_t MHD_Daemon::pool_size

Size of the per-connection memory pools.

Definition at line 893 of file internal.h.

Referenced by MHD_connection_get_pollfd(), MHD_start_daemon_va(), parse_options_va(), and try_ready_chunked_body().

uint16_t MHD_Daemon::port

Listen port.

Definition at line 962 of file internal.h.

Referenced by MHD_start_daemon_va().

int MHD_Daemon::shutdown

Are we shutting down?

Definition at line 935 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 923 of file internal.h.

Referenced by MHD_accept_connection(), MHD_get_daemon_info(), MHD_get_fdset(), MHD_select(), MHD_start_daemon_va(), MHD_stop_daemon(), and parse_options_va().

size_t MHD_Daemon::thread_stack_size

Size of threads created by MHD.

Definition at line 898 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 855 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 860 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 845 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 850 of file internal.h.

Referenced by parse_options_va().

struct MHD_Daemon* MHD_Daemon::worker_pool

Worker daemons (one per thread)

Definition at line 883 of file internal.h.

Referenced by MHD_stop_daemon().

unsigned int MHD_Daemon::worker_pool_size

Number of worker daemons

Definition at line 903 of file internal.h.

Referenced by 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).

Definition at line 930 of file internal.h.

Referenced by MHD_select(), MHD_start_daemon_va(), and MHD_stop_daemon().


The documentation for this struct was generated from the following file:
Generated on Thu Sep 27 17:59:06 2012 for GNU libmicrohttpd by  doxygen 1.4.7