| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Queue a response to be transmitted to the client as soon as possible (increment the reference counter).
the connection identifying the client;
HTTP status code (i.e. 200 for OK);
response to transmit.
Return MHD_YES on success or if message has been queued. Return
MHD_NO: if arguments are invalid (example: NULL pointer); on
error (i.e. reply already sent).
Destroy a response object and associated resources (decrement the reference counter). Note that MHD may keep some of the resources around if the response is still in the queue for some clients, so the memory may not necessarily be freed immediatley.
An explanation of reference counting(1):
MHD_Response object is allocated:
struct MHD_Response * response = MHD_create_response_from_data(...); /* here: reference counter = 1 */ |
MHD_Response object is enqueued in a MHD_Connection:
MHD_queue_response(connection, , response); /* here: reference counter = 2 */ |
MHD_destroy_response(response); /* here: reference counter = 1 */ |
MHD_destroy_response(): the counter's value drops to zero and
the MHD_Response object is released.
This document was generated by Christian Grothoff on November, 16 2008 using texi2html 1.78.