79 #ifndef MHD_MICROHTTPD_H 80 #define MHD_MICROHTTPD_H 103 #ifndef MHD_PLATFORM_H 106 #include <sys/types.h> 107 #if defined(_WIN32) && !defined(__CYGWIN__) 108 #include <ws2tcpip.h> 109 #if defined(_MSC_FULL_VER) && !defined (_SSIZE_T_DEFINED) 110 #define _SSIZE_T_DEFINED 111 typedef intptr_t ssize_t;
115 #include <sys/time.h> 116 #include <sys/socket.h> 120 #if defined(__CYGWIN__) && !defined(_SYS_TYPES_FD_SET) 122 #error Cygwin with winsock fd_set is not supported 129 #define MHD_VERSION 0x00095102 144 #define MHD_INVALID_NONCE -1 151 #define MHD_SIZE_UNKNOWN UINT64_MAX 153 #define MHD_SIZE_UNKNOWN ((uint64_t) -1LL) 157 #define MHD_CONTENT_READER_END_OF_STREAM SIZE_MAX 158 #define MHD_CONTENT_READER_END_WITH_ERROR (SIZE_MAX - 1) 160 #define MHD_CONTENT_READER_END_OF_STREAM ((size_t) -1LL) 161 #define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1) 165 #if defined(_WIN32) && defined(MHD_W32LIB) 166 #define _MHD_EXTERN extern 167 #elif defined (_WIN32) && defined(MHD_W32DLL) 169 #define _MHD_EXTERN __declspec(dllimport) 171 #define _MHD_EXTERN extern 175 #ifndef MHD_SOCKET_DEFINED 179 #if !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) 180 #define MHD_POSIX_SOCKETS 1 182 #define MHD_INVALID_SOCKET (-1) 184 #define MHD_WINSOCK_SOCKETS 1 185 #include <winsock2.h> 187 #define MHD_INVALID_SOCKET (INVALID_SOCKET) 189 #define MHD_SOCKET_DEFINED 1 195 #ifdef MHD_NO_DEPRECATION 196 #define _MHD_DEPR_MACRO(msg) 197 #define _MHD_NO_DEPR_IN_MACRO 1 198 #define _MHD_DEPR_IN_MACRO(msg) 199 #define _MHD_NO_DEPR_FUNC 1 200 #define _MHD_DEPR_FUNC(msg) 203 #ifndef _MHD_DEPR_MACRO 204 #if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1500 207 #define _MHD_INSTRMACRO(a) #a 208 #define _MHD_STRMACRO(a) _MHD_INSTRMACRO(a) 210 #define _MHD_DEPR_MACRO(msg) __pragma(message(__FILE__ "(" _MHD_STRMACRO(__LINE__)"): warning: " msg)) 211 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) 212 #elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__) 214 #define _MHD_GCC_PRAG(x) _Pragma (#x) 215 #if __clang_major__+0 >= 5 || \ 216 (!defined(__apple_build_version__) && (__clang_major__+0 > 3 || (__clang_major__+0 == 3 && __clang_minor__ >= 3))) || \ 217 __GNUC__+0 > 4 || (__GNUC__+0 == 4 && __GNUC_MINOR__+0 >= 8) 220 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(GCC warning msg) 221 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) 224 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(message msg) 225 #if (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9)) 227 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) 234 #ifndef _MHD_DEPR_MACRO 235 #define _MHD_DEPR_MACRO(msg) 238 #ifndef _MHD_DEPR_IN_MACRO 239 #define _MHD_NO_DEPR_IN_MACRO 1 240 #define _MHD_DEPR_IN_MACRO(msg) 243 #ifndef _MHD_DEPR_FUNC 244 #if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1400 246 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated(msg)) 247 #elif defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1310 249 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated) 250 #elif (__GNUC__+0 >= 5) || (defined (__clang__) && \ 251 (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9))) 253 #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated(msg))) 254 #elif defined (__clang__) || __GNUC__+0 > 3 || (__GNUC__+0 == 3 && __GNUC_MINOR__+0 >= 1) 257 #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__)) 262 #ifndef _MHD_DEPR_FUNC 263 #define _MHD_NO_DEPR_FUNC 1 264 #define _MHD_DEPR_FUNC(msg) 272 #ifndef MHD_LONG_LONG 276 #define MHD_LONG_LONG long long 277 #define MHD_UNSIGNED_LONG_LONG unsigned long long 279 _MHD_DEPR_MACRO(
"Macro MHD_LONG_LONG is deprecated, use MHD_UNSIGNED_LONG_LONG")
285 #ifndef MHD_LONG_LONG_PRINTF 289 #define MHD_LONG_LONG_PRINTF "ll" 290 #define MHD_UNSIGNED_LONG_LONG_PRINTF "%llu" 292 _MHD_DEPR_MACRO(
"Macro MHD_LONG_LONG_PRINTF is deprecated, use MHD_UNSIGNED_LONG_LONG_PRINTF")
301 #define MHD_HTTP_CONTINUE 100 302 #define MHD_HTTP_SWITCHING_PROTOCOLS 101 303 #define MHD_HTTP_PROCESSING 102 305 #define MHD_HTTP_OK 200 306 #define MHD_HTTP_CREATED 201 307 #define MHD_HTTP_ACCEPTED 202 308 #define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203 309 #define MHD_HTTP_NO_CONTENT 204 310 #define MHD_HTTP_RESET_CONTENT 205 311 #define MHD_HTTP_PARTIAL_CONTENT 206 312 #define MHD_HTTP_MULTI_STATUS 207 314 #define MHD_HTTP_MULTIPLE_CHOICES 300 315 #define MHD_HTTP_MOVED_PERMANENTLY 301 316 #define MHD_HTTP_FOUND 302 317 #define MHD_HTTP_SEE_OTHER 303 318 #define MHD_HTTP_NOT_MODIFIED 304 319 #define MHD_HTTP_USE_PROXY 305 320 #define MHD_HTTP_SWITCH_PROXY 306 321 #define MHD_HTTP_TEMPORARY_REDIRECT 307 322 #define MHD_HTTP_PERMANENT_REDIRECT 308 324 #define MHD_HTTP_BAD_REQUEST 400 325 #define MHD_HTTP_UNAUTHORIZED 401 326 #define MHD_HTTP_PAYMENT_REQUIRED 402 327 #define MHD_HTTP_FORBIDDEN 403 328 #define MHD_HTTP_NOT_FOUND 404 329 #define MHD_HTTP_METHOD_NOT_ALLOWED 405 330 #define MHD_HTTP_NOT_ACCEPTABLE 406 332 #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \ 333 _MHD_DEPR_IN_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") 406 334 #define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407 335 #define MHD_HTTP_REQUEST_TIMEOUT 408 336 #define MHD_HTTP_CONFLICT 409 337 #define MHD_HTTP_GONE 410 338 #define MHD_HTTP_LENGTH_REQUIRED 411 339 #define MHD_HTTP_PRECONDITION_FAILED 412 340 #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE 413 341 #define MHD_HTTP_REQUEST_URI_TOO_LONG 414 342 #define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415 343 #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE 416 344 #define MHD_HTTP_EXPECTATION_FAILED 417 345 #define MHD_HTTP_UNPROCESSABLE_ENTITY 422 346 #define MHD_HTTP_LOCKED 423 347 #define MHD_HTTP_FAILED_DEPENDENCY 424 348 #define MHD_HTTP_UNORDERED_COLLECTION 425 349 #define MHD_HTTP_UPGRADE_REQUIRED 426 350 #define MHD_HTTP_NO_RESPONSE 444 351 #define MHD_HTTP_RETRY_WITH 449 352 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450 353 #define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451 355 #define MHD_HTTP_INTERNAL_SERVER_ERROR 500 356 #define MHD_HTTP_NOT_IMPLEMENTED 501 357 #define MHD_HTTP_BAD_GATEWAY 502 358 #define MHD_HTTP_SERVICE_UNAVAILABLE 503 359 #define MHD_HTTP_GATEWAY_TIMEOUT 504 360 #define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505 361 #define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506 362 #define MHD_HTTP_INSUFFICIENT_STORAGE 507 363 #define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509 364 #define MHD_HTTP_NOT_EXTENDED 510 384 #define MHD_ICY_FLAG ((uint32_t)(((uint32_t)1) << 31)) 392 #define MHD_HTTP_HEADER_ACCEPT "Accept" 393 #define MHD_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset" 394 #define MHD_HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding" 395 #define MHD_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language" 396 #define MHD_HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges" 397 #define MHD_HTTP_HEADER_AGE "Age" 398 #define MHD_HTTP_HEADER_ALLOW "Allow" 399 #define MHD_HTTP_HEADER_AUTHORIZATION "Authorization" 400 #define MHD_HTTP_HEADER_CACHE_CONTROL "Cache-Control" 401 #define MHD_HTTP_HEADER_CONNECTION "Connection" 402 #define MHD_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding" 403 #define MHD_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language" 404 #define MHD_HTTP_HEADER_CONTENT_LENGTH "Content-Length" 405 #define MHD_HTTP_HEADER_CONTENT_LOCATION "Content-Location" 406 #define MHD_HTTP_HEADER_CONTENT_MD5 "Content-MD5" 407 #define MHD_HTTP_HEADER_CONTENT_RANGE "Content-Range" 408 #define MHD_HTTP_HEADER_CONTENT_TYPE "Content-Type" 409 #define MHD_HTTP_HEADER_COOKIE "Cookie" 410 #define MHD_HTTP_HEADER_DATE "Date" 411 #define MHD_HTTP_HEADER_ETAG "ETag" 412 #define MHD_HTTP_HEADER_EXPECT "Expect" 413 #define MHD_HTTP_HEADER_EXPIRES "Expires" 414 #define MHD_HTTP_HEADER_FROM "From" 415 #define MHD_HTTP_HEADER_HOST "Host" 416 #define MHD_HTTP_HEADER_IF_MATCH "If-Match" 417 #define MHD_HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since" 418 #define MHD_HTTP_HEADER_IF_NONE_MATCH "If-None-Match" 419 #define MHD_HTTP_HEADER_IF_RANGE "If-Range" 420 #define MHD_HTTP_HEADER_IF_UNMODIFIED_SINCE "If-Unmodified-Since" 421 #define MHD_HTTP_HEADER_LAST_MODIFIED "Last-Modified" 422 #define MHD_HTTP_HEADER_LOCATION "Location" 423 #define MHD_HTTP_HEADER_MAX_FORWARDS "Max-Forwards" 424 #define MHD_HTTP_HEADER_PRAGMA "Pragma" 425 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate" 426 #define MHD_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization" 427 #define MHD_HTTP_HEADER_RANGE "Range" 429 #define MHD_HTTP_HEADER_REFERER "Referer" 430 #define MHD_HTTP_HEADER_RETRY_AFTER "Retry-After" 431 #define MHD_HTTP_HEADER_SERVER "Server" 432 #define MHD_HTTP_HEADER_SET_COOKIE "Set-Cookie" 433 #define MHD_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2" 434 #define MHD_HTTP_HEADER_TE "TE" 435 #define MHD_HTTP_HEADER_TRAILER "Trailer" 436 #define MHD_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding" 437 #define MHD_HTTP_HEADER_UPGRADE "Upgrade" 438 #define MHD_HTTP_HEADER_USER_AGENT "User-Agent" 439 #define MHD_HTTP_HEADER_VARY "Vary" 440 #define MHD_HTTP_HEADER_VIA "Via" 441 #define MHD_HTTP_HEADER_WARNING "Warning" 442 #define MHD_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate" 443 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN "Access-Control-Allow-Origin" 444 #define MHD_HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition" 454 #define MHD_HTTP_VERSION_1_0 "HTTP/1.0" 455 #define MHD_HTTP_VERSION_1_1 "HTTP/1.1" 464 #define MHD_HTTP_METHOD_CONNECT "CONNECT" 465 #define MHD_HTTP_METHOD_DELETE "DELETE" 466 #define MHD_HTTP_METHOD_GET "GET" 467 #define MHD_HTTP_METHOD_HEAD "HEAD" 468 #define MHD_HTTP_METHOD_OPTIONS "OPTIONS" 469 #define MHD_HTTP_METHOD_POST "POST" 470 #define MHD_HTTP_METHOD_PUT "PUT" 471 #define MHD_HTTP_METHOD_PATCH "PATCH" 472 #define MHD_HTTP_METHOD_TRACE "TRACE" 481 #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED "application/x-www-form-urlencoded" 482 #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data" 513 struct MHD_PostProcessor;
549 #define MHD_USE_SSL \ 550 _MHD_DEPR_IN_MACRO("Value MHD_USE_SSL is deprecated, use MHD_USE_TLS") \ 625 #define MHD_USE_EPOLL_LINUX_ONLY \ 626 _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_LINUX_ONLY is deprecated, use MHD_USE_EPOLL") \ 637 #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \ 638 _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNALLY") \ 639 MHD_USE_EPOLL_INTERNALLY 657 #define MHD_USE_PIPE_FOR_SHUTDOWN \ 658 _MHD_DEPR_IN_MACRO("Value MHD_USE_PIPE_FOR_SHUTDOWN is deprecated, use MHD_USE_ITC") \ 1356 const char *reason);
1368 const struct sockaddr *addr,
1417 const char *upload_data,
1418 size_t *upload_data_size,
1575 const char *filename,
1576 const char *content_type,
1577 const char *transfer_encoding,
1698 const struct sockaddr *addr,
1723 fd_set *read_fd_set,
1724 fd_set *write_fd_set,
1725 fd_set *except_fd_set,
1752 fd_set *read_fd_set,
1753 fd_set *write_fd_set,
1754 fd_set *except_fd_set,
1756 unsigned int fd_setsize);
1778 #define MHD_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set,max_fd) \ 1779 MHD_get_fdset2((daemon),(read_fd_set),(write_fd_set),(except_fd_set),(max_fd),FD_SETSIZE) 1845 const fd_set *read_fd_set,
1846 const fd_set *write_fd_set,
1847 const fd_set *except_fd_set);
1869 void *iterator_cls);
1966 unsigned int status_code,
2105 _MHD_DEPR_FUNC(
"MHD_create_response_from_data() is deprecated, use MHD_create_response_from_buffer()") \
2215 _MHD_DEPR_FUNC(
"Function MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
2221 #if !defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC) 2224 #define MHD_create_response_from_fd_at_offset(size,fd,offset) \ 2225 _MHD_DEPR_IN_MACRO("Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \ 2226 MHD_create_response_from_fd_at_offset64((size),(fd),(offset)) 2345 const char *extra_in,
2346 size_t extra_in_size,
2411 const char *content);
2426 const char *content);
2441 const char *content);
2520 const char *post_data,
size_t post_data_len);
2545 #define MHD_INVALID_NONCE -1 2576 const char *username,
2577 const char *password,
2578 unsigned int nonce_timeout);
#define _MHD_DEPR_FUNC(msg)
int(* MHD_KeyValueIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
_MHD_EXTERN struct MHD_Daemon * MHD_start_daemon_va(unsigned int flags, uint16_t port, MHD_AcceptPolicyCallback apc, void *apc_cls, MHD_AccessHandlerCallback dh, void *dh_cls, va_list ap)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_callback(uint64_t size, size_t block_size, MHD_ContentReaderCallback crc, void *crc_cls, MHD_ContentReaderFreeCallback crfc)
_MHD_EXTERN const char * MHD_get_version(void)
_MHD_EXTERN const char * MHD_lookup_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key)
_MHD_EXTERN int MHD_add_response_header(struct MHD_Response *response, const char *header, const char *content)
MHD_ContentReaderFreeCallback crfc
_MHD_EXTERN int MHD_get_timeout(struct MHD_Daemon *daemon, MHD_UNSIGNED_LONG_LONG *timeout)
void(* MHD_ContentReaderFreeCallback)(void *cls)
_MHD_EXTERN int MHD_add_connection(struct MHD_Daemon *daemon, MHD_socket client_socket, const struct sockaddr *addr, socklen_t addrlen)
int(* MHD_PostDataIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size)
_MHD_EXTERN int MHD_queue_basic_auth_fail_response(struct MHD_Connection *connection, const char *realm, struct MHD_Response *response)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd64(uint64_t size, int fd)
MHD_RequestTerminationCode
_MHD_EXTERN int MHD_destroy_post_processor(struct MHD_PostProcessor *pp)
_MHD_EXTERN int MHD_digest_auth_check(struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout)
_MHD_EXTERN struct MHD_Daemon * MHD_start_daemon(unsigned int flags, uint16_t port, MHD_AcceptPolicyCallback apc, void *apc_cls, MHD_AccessHandlerCallback dh, void *dh_cls,...)
MHD_ConnectionNotificationCode
_MHD_EXTERN void MHD_set_panic_func(MHD_PanicCallback cb, void *cls)
#define MHD_UNSIGNED_LONG_LONG
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
_MHD_EXTERN struct MHD_PostProcessor * MHD_create_post_processor(struct MHD_Connection *connection, size_t buffer_size, MHD_PostDataIterator iter, void *iter_cls)
void(* MHD_LogCallback)(void *cls, const char *fm, va_list ap)
_MHD_EXTERN const union MHD_ConnectionInfo * MHD_get_connection_info(struct MHD_Connection *connection, enum MHD_ConnectionInfoType info_type,...)
_MHD_EXTERN char * MHD_basic_auth_get_username_password(struct MHD_Connection *connection, char **password)
_MHD_EXTERN void MHD_stop_daemon(struct MHD_Daemon *daemon)
MHD_UpgradeHandler upgrade_handler
_MHD_EXTERN int MHD_queue_auth_fail_response(struct MHD_Connection *connection, const char *realm, const char *opaque, struct MHD_Response *response, int signal_stale)
_MHD_EXTERN int MHD_add_response_footer(struct MHD_Response *response, const char *footer, const char *content)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd_at_offset64(uint64_t size, int fd, uint64_t offset)
_MHD_EXTERN int MHD_run_from_select(struct MHD_Daemon *daemon, const fd_set *read_fd_set, const fd_set *write_fd_set, const fd_set *except_fd_set)
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
_MHD_EXTERN char * MHD_digest_auth_get_username(struct MHD_Connection *connection)
_MHD_EXTERN void MHD_destroy_response(struct MHD_Response *response)
_MHD_EXTERN void MHD_suspend_connection(struct MHD_Connection *connection)
_MHD_EXTERN int MHD_set_connection_option(struct MHD_Connection *connection, enum MHD_CONNECTION_OPTION option,...)
struct MHD_Response * MHD_create_response_from_data(size_t size, void *data, int must_free, int must_copy)
struct MHD_Daemon * daemon
_MHD_EXTERN int MHD_post_process(struct MHD_PostProcessor *pp, const char *post_data, size_t post_data_len)
#define MHD_create_response_from_fd_at_offset(size, fd, offset)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd(size_t size, int fd)
_MHD_EXTERN int MHD_upgrade_action(struct MHD_UpgradeResponseHandle *urh, enum MHD_UpgradeAction action,...)
_MHD_EXTERN int MHD_queue_response(struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer(size_t size, void *buffer, enum MHD_ResponseMemoryMode mode)
MHD_AcceptPolicyCallback apc
int(* MHD_AccessHandlerCallback)(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls)
_MHD_EXTERN struct MHD_Response * MHD_create_response_for_upgrade(MHD_UpgradeHandler upgrade_handler, void *upgrade_handler_cls)
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
void(* MHD_UpgradeHandler)(void *cls, struct MHD_Connection *connection, void *con_cls, const char *extra_in, size_t extra_in_size, MHD_socket sock, struct MHD_UpgradeResponseHandle *urh)
_MHD_EXTERN int MHD_set_response_options(struct MHD_Response *response, enum MHD_ResponseFlags flags,...)
_MHD_EXTERN int MHD_get_connection_values(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
_MHD_EXTERN int MHD_run(struct MHD_Daemon *daemon)
#define MHD_get_fdset(daemon, read_fd_set, write_fd_set, except_fd_set, max_fd)
MHD_ContentReaderCallback crc
_MHD_EXTERN int MHD_is_feature_supported(enum MHD_FEATURE feature)
struct sockaddr * client_addr
_MHD_EXTERN int MHD_del_response_header(struct MHD_Response *response, const char *header, const char *content)
#define _MHD_DEPR_MACRO(msg)
_MHD_EXTERN int MHD_get_fdset2(struct MHD_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, MHD_socket *max_fd, unsigned int fd_setsize)
_MHD_EXTERN const char * MHD_get_response_header(struct MHD_Response *response, const char *key)
_MHD_EXTERN MHD_socket MHD_quiesce_daemon(struct MHD_Daemon *daemon)
unsigned int num_connections
int(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
_MHD_EXTERN const union MHD_DaemonInfo * MHD_get_daemon_info(struct MHD_Daemon *daemon, enum MHD_DaemonInfoType info_type,...)
_MHD_EXTERN size_t MHD_http_unescape(char *val)
void * upgrade_handler_cls
_MHD_EXTERN const char * MHD_get_reason_phrase_for(unsigned int code)
_MHD_EXTERN int MHD_set_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, const char *value)
MHD_FLAG
Flags for the struct MHD_Daemon.
_MHD_EXTERN int MHD_get_response_headers(struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)
_MHD_EXTERN void MHD_resume_connection(struct MHD_Connection *connection)