| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Options for the MHD daemon.
Note that if neither MHD_USER_THREAD_PER_CONNECTION nor
MHD_USE_SELECT_INTERNALLY are used, the client wants control over
the process and will call the appropriate microhttpd callbacks.
Starting the daemon may also fail if a particular option is not implemented or not supported on the target platform (i.e. no support for SSL, threads or IPv6).
MHD_NO_FLAGNo options selected.
MHD_USE_DEBUGRun in debug mode. If this flag is used, the library should print error
messages and warnings to stderr. Note that MHD also needs to be
compiled with the configure option --enable-messages for this
run-time option to have any effect.
MHD_USE_SSLRun in https mode (this is not yet supported).
MHD_USE_THREAD_PER_CONNECTIONRun using one thread per connection.
MHD_USE_SELECT_INTERNALLYRun using an internal thread doing SELECT.
MHD_USE_IPv6Run using the IPv6 protocol (otherwise, MHD will just support IPv4).
MHD_USE_PEDANTIC_CHECKSBe pedantic about the protocol (as opposed to as tolerant as possible).
Specifically, at the moment, this flag causes MHD to reject HTTP
1.1 connections without a Host header. This is required by the
standard, but of course in violation of the “be as liberal as possible
in what you accept” norm. It is recommended to turn this ON
if you are testing clients against MHD, and OFF in
production.
MHD options. Passed in the varargs portion of
MHD_start_daemon().
MHD_OPTION_ENDNo more options / last option. This is used to terminate the VARARGs list.
MHD_OPTION_CONNECTION_MEMORY_LIMITMaximum memory size per connection (followed by an unsigned int).
MHD_OPTION_CONNECTION_LIMITMaximum number of concurrenct connections to accept (followed by an
unsigned int).
MHD_OPTION_CONNECTION_TIMEOUTAfter how many seconds of inactivity should a connection automatically
be timed out? (followed by an unsigned int; use zero for no
timeout).
MHD_OPTION_NOTIFY_COMPLETEDRegister a function that should be called whenever a request has been
completed (this can be used for application-specific clean up).
Requests that have never been presented to the application (via
MHD_AccessHandlerCallback()) will not result in
notifications.
This option should be followed by TWO pointers. First a
pointer to a function of type MHD_RequestCompletedCallback()
and second a pointer to a closure to pass to the request completed
callback. The second pointer maybe NULL.
MHD_OPTION_PER_IP_CONNECTION_LIMITLimit on the number of (concurrent) connections made to the
server from the same IP address. Can be used to prevent one
IP from taking over all of the allowed connections. If the
same IP tries to establish more than the specified number of
connections, they will be immediately rejected. The option
should be followed by an unsigned int. The default is
zero, which means no limit on the number of connections
from the same IP address.
The MHD_ValueKind specifies the source of the key-value pairs in
the HTTP protocol.
MHD_RESPONSE_HEADER_KINDResponse header.
MHD_HEADER_KINDHTTP header.
MHD_COOKIE_KINDCookies. Note that the original HTTP header containing the cookie(s) will still be available and intact.
MHD_POSTDATA_KINDPOST data. This is available only if a content encoding
supported by MHD is used (currently only URL encoding), and
only if the posted content fits within the available memory pool. Note
that in that case, the upload data given to the
MHD_AccessHandlerCallback() will be empty (since it has
already been processed).
MHD_GET_ARGUMENT_KINDGET (URI) arguments.
MHD_HEADER_KINDHTTP footer (only for http 1.1 chunked encodings).
The MHD_RequestTerminationCode specifies reasons why a request
has been terminated (or completed).
MHD_REQUEST_TERMINATED_COMPLETED_OKWe finished sending the response.
MHD_REQUEST_TERMINATED_WITH_ERRORError handling the connection (resources exhausted, other side closed connection, application error accepting request, etc.)
MHD_REQUEST_TERMINATED_TIMEOUT_REACHEDNo activity on the connection for the number of seconds specified using
MHD_OPTION_CONNECTION_TIMEOUT.
MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWNWe had to close the session since MHD was being shut down.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Christian Grothoff on May, 26 2008 using texi2html 1.78.