Ulfius
HTTP Framework for REST Applications in C
|
Functions | |
int | ulfius_set_stream_response (struct _u_response *response, const unsigned int status, ssize_t(*stream_callback)(void *stream_user_data, uint64_t offset, char *out_buf, size_t max), void(*stream_callback_free)(void *stream_user_data), uint64_t stream_size, size_t stream_block_size, void *stream_user_data) |
Response streaming function
int ulfius_set_stream_response | ( | struct _u_response * | response, |
const unsigned int | status, | ||
ssize_t(*)(void *stream_user_data, uint64_t offset, char *out_buf, size_t max) | stream_callback, | ||
void(*)(void *stream_user_data) | stream_callback_free, | ||
uint64_t | stream_size, | ||
size_t | stream_block_size, | ||
void * | stream_user_data | ||
) |
ulfius_set_stream_response Set an stream response with a status
response | the response to be updated |
status | the http status code to set to the response |
stream_callback | a pointer to a function that will handle the response stream |
stream_callback_free | a pointer to a function that will free its allocated resources during stream_callback |
stream_size | size of the streamed data (U_STREAM_SIZE_UNKNOWN if unknown) |
stream_block_size | preferred size of each stream chunk, may be overwritten by the system if necessary |
stream_user_data | a user-defined pointer that will be available in stream_callback and stream_callback_free |