| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Create a response object. The response object can be extended with header information and then it can be used any number of times.
size of the data portion of the response, -1 for unknown;
preferred block size for querying crc (advisory only, MHD may still call crc using smaller chunks); this is essentially the buffer size used for IO, clients should pick a value that is appropriate for IO and memory performance requirements;
callback to use to obtain response data;
extra argument to crc;
callback to call to free crc_cls resources.
Return NULL on error (i.e. invalid arguments, out of memory).
Create a response object. The response object can be extended with header information and then it can be used any number of times.
size of the data portion of the response;
the data itself;
if true: MHD should free data when done;
if true: MHD allocates a block of memory and use it to make a copy of
data embedded in the returned MHD_Response structure;
handling of the embedded memory is responsibility of MHD; data
can be released anytime after this call returns.
Return NULL on error (i.e. invalid arguments, out of memory).
Example: create a response from a statically allocated string:
const char * data = "<html><body><p>Error!</p></body></html>";
struct MHD_Connection * connection = ...;
struct MHD_Response * response;
response = MHD_create_response_from_data(strlen(data), data,
MHD_NO, MHD_NO);
MHD_queue_response(connection, 404, response);
MHD_destroy_response(response);
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Christian Grothoff on November, 16 2008 using texi2html 1.78.