aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/microhttpd.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index cca58347..b8209862 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -162,7 +162,7 @@ enum MHD_OPTION {
162 /** 162 /**
163 * Run using one thread per connection. 163 * Run using one thread per connection.
164 */ 164 */
165 MHD_USE_THREAD_PER_CONNECTION = 4, 165 MHD_USE_THREAD_PER_CONNECTION = 4,
166 166
167 /** 167 /**
168 * Run using an internal thread doing SELECT. 168 * Run using an internal thread doing SELECT.
@@ -221,13 +221,13 @@ struct MHD_Response;
221 221
222/** 222/**
223 * Allow or deny a client to connect. 223 * Allow or deny a client to connect.
224 * 224 *
225 * 225 *
226 * @param addr address information from the client 226 * @param addr address information from the client
227 * @param addrlen length of the address information 227 * @param addrlen length of the address information
228 * @return MHD_YES if connection is allowed, MHD_NO if not 228 * @return MHD_YES if connection is allowed, MHD_NO if not
229 */ 229 */
230typedef int 230typedef int
231(*MHD_AcceptPolicyCallback)(void * cls, 231(*MHD_AcceptPolicyCallback)(void * cls,
232 const struct sockaddr * addr, 232 const struct sockaddr * addr,
233 socklen_t addrlen); 233 socklen_t addrlen);
@@ -260,7 +260,7 @@ typedef int
260 * also to iterate over the headers that have been 260 * also to iterate over the headers that have been
261 * added to a response. 261 * added to a response.
262 * 262 *
263 * @return MHD_YES to continue iterating, 263 * @return MHD_YES to continue iterating,
264 * MHD_NO to abort the iteration 264 * MHD_NO to abort the iteration
265 */ 265 */
266typedef int 266typedef int
@@ -289,11 +289,11 @@ typedef int
289 * be queried multiple times for the same data; 289 * be queried multiple times for the same data;
290 * however, if an MHD_Response is not re-used, 290 * however, if an MHD_Response is not re-used,
291 * libmicrohttpd guarantees that "pos" will be 291 * libmicrohttpd guarantees that "pos" will be
292 * the sum of all non-negative return values 292 * the sum of all non-negative return values
293 * obtained from the content reader so far. 293 * obtained from the content reader so far.
294 * @return -1 on error (libmicrohttpd will no longer 294 * @return -1 on error (libmicrohttpd will no longer
295 * try to read content and instead close the connection 295 * try to read content and instead close the connection
296 * with the client). 296 * with the client).
297 */ 297 */
298typedef int 298typedef int
299(*MHD_ContentReaderCallback)(void * cls, 299(*MHD_ContentReaderCallback)(void * cls,
@@ -344,7 +344,7 @@ MHD_stop_daemon(struct MHD_Daemon * daemon);
344 * daemon was not started with the right 344 * daemon was not started with the right
345 * options for this call. 345 * options for this call.
346 */ 346 */
347int 347int
348MHD_get_fdset(struct MHD_Daemon * daemon, 348MHD_get_fdset(struct MHD_Daemon * daemon,
349 fd_set * read_fd_set, 349 fd_set * read_fd_set,
350 fd_set * write_fd_set, 350 fd_set * write_fd_set,
@@ -355,7 +355,7 @@ MHD_get_fdset(struct MHD_Daemon * daemon,
355 * Run webserver operations (without blocking unless 355 * Run webserver operations (without blocking unless
356 * in client callbacks). This method should be called 356 * in client callbacks). This method should be called
357 * by clients in combination with MHD_get_fdset 357 * by clients in combination with MHD_get_fdset
358 * if the client-controlled select method is used. 358 * if the client-controlled select method is used.
359 * 359 *
360 * @return MHD_YES on success, MHD_NO if this 360 * @return MHD_YES on success, MHD_NO if this
361 * daemon was not started with the right 361 * daemon was not started with the right
@@ -368,11 +368,11 @@ MHD_run(struct MHD_Daemon * daemon);
368/** 368/**
369 * Register an access handler for all URIs beginning with uri_prefix. 369 * Register an access handler for all URIs beginning with uri_prefix.
370 * 370 *
371 * @param uri_prefix 371 * @param uri_prefix
372 * @return MRI_NO if a handler for this exact prefix 372 * @return MRI_NO if a handler for this exact prefix
373 * already exists 373 * already exists
374 */ 374 */
375int 375int
376MHD_register_handler(struct MHD_Daemon * daemon, 376MHD_register_handler(struct MHD_Daemon * daemon,
377 const char * uri_prefix, 377 const char * uri_prefix,
378 MHD_AccessHandlerCallback dh, 378 MHD_AccessHandlerCallback dh,
@@ -382,11 +382,11 @@ MHD_register_handler(struct MHD_Daemon * daemon,
382 * Unregister an access handler for the URIs beginning with 382 * Unregister an access handler for the URIs beginning with
383 * uri_prefix. 383 * uri_prefix.
384 * 384 *
385 * @param uri_prefix 385 * @param uri_prefix
386 * @return MHD_NO if a handler for this exact prefix 386 * @return MHD_NO if a handler for this exact prefix
387 * is not known for this daemon 387 * is not known for this daemon
388 */ 388 */
389int 389int
390MHD_unregister_handler(struct MHD_Daemon * daemon, 390MHD_unregister_handler(struct MHD_Daemon * daemon,
391 const char * uri_prefix, 391 const char * uri_prefix,
392 MHD_AccessHandlerCallback dh, 392 MHD_AccessHandlerCallback dh,
@@ -399,7 +399,7 @@ MHD_unregister_handler(struct MHD_Daemon * daemon,
399 * maybe NULL (then just count headers) 399 * maybe NULL (then just count headers)
400 * @param iterator_cls extra argument to iterator 400 * @param iterator_cls extra argument to iterator
401 * @return number of entries iterated over 401 * @return number of entries iterated over
402 */ 402 */
403int 403int
404MHD_get_session_values(struct MHD_Session * session, 404MHD_get_session_values(struct MHD_Session * session,
405 enum MHD_ValueKind kind, 405 enum MHD_ValueKind kind,
@@ -412,7 +412,7 @@ MHD_get_session_values(struct MHD_Session * session,
412 * 412 *
413 * @param key the header to look for 413 * @param key the header to look for
414 * @return NULL if no such item was found 414 * @return NULL if no such item was found
415 */ 415 */
416const char * 416const char *
417MHD_lookup_session_value(struct MHD_Session * session, 417MHD_lookup_session_value(struct MHD_Session * session,
418 enum MHD_ValueKind kind, 418 enum MHD_ValueKind kind,
@@ -421,19 +421,19 @@ MHD_lookup_session_value(struct MHD_Session * session,
421/** 421/**
422 * Queue a response to be transmitted to the client (as soon as 422 * Queue a response to be transmitted to the client (as soon as
423 * possible). 423 * possible).
424 * 424 *
425 * @param session the session identifying the client 425 * @param session the session identifying the client
426 * @param status_code HTTP status code (i.e. 200 for OK) 426 * @param status_code HTTP status code (i.e. 200 for OK)
427 * @param response response to transmit 427 * @param response response to transmit
428 * @return MHD_NO on error (i.e. reply already sent), 428 * @return MHD_NO on error (i.e. reply already sent),
429 * MHD_YES on success or if message has been queued 429 * MHD_YES on success or if message has been queued
430 */ 430 */
431int 431int
432MHD_queue_response(struct MHD_Session * session, 432MHD_queue_response(struct MHD_Session * session,
433 unsigned int status_code, 433 unsigned int status_code,
434 struct MHD_Response * response); 434 struct MHD_Response * response);
435 435
436 436
437/** 437/**
438 * Create a response object. The response object can be extended with 438 * Create a response object. The response object can be extended with
439 * header information and then be used any number of times. 439 * header information and then be used any number of times.
@@ -457,7 +457,7 @@ MHD_create_response_from_callback(size_t size,
457 * @param size size of the data portion of the response 457 * @param size size of the data portion of the response
458 * @param data the data itself 458 * @param data the data itself
459 * @param must_free libmicrohttpd should free data when done 459 * @param must_free libmicrohttpd should free data when done
460 * @param must_copy libmicrohttpd must make a copy of data 460 * @param must_copy libmicrohttpd must make a copy of data
461 * right away, the data maybe released anytime after 461 * right away, the data maybe released anytime after
462 * this call returns 462 * this call returns
463 * @return NULL on error (i.e. invalid arguments, out of memory) 463 * @return NULL on error (i.e. invalid arguments, out of memory)
@@ -504,7 +504,7 @@ MHD_del_response_header(struct MHD_Response * response,
504 * maybe NULL (then just count headers) 504 * maybe NULL (then just count headers)
505 * @param iterator_cls extra argument to iterator 505 * @param iterator_cls extra argument to iterator
506 * @return number of entries iterated over 506 * @return number of entries iterated over
507 */ 507 */
508int 508int
509MHD_get_response_headers(struct MHD_Response * response, 509MHD_get_response_headers(struct MHD_Response * response,
510 MHD_KeyValueIterator iterator, 510 MHD_KeyValueIterator iterator,
@@ -516,7 +516,7 @@ MHD_get_response_headers(struct MHD_Response * response,
516 * 516 *
517 * @param key which header to get 517 * @param key which header to get
518 * @return NULL if header does not exist 518 * @return NULL if header does not exist
519 */ 519 */
520const char * 520const char *
521MHD_get_response_header(struct MHD_Response * response, 521MHD_get_response_header(struct MHD_Response * response,
522 const char * key); 522 const char * key);