[Libevent-users] Using Chunked callback
Niels Provos
provos at citi.umich.edu
Thu Feb 28 11:34:42 EST 2008
On Thu, Feb 28, 2008 at 3:28 AM, Lyes Amazouz <lyesloui at gmail.com> wrote:
> I've seen that in the libevent we have, in the server side, the function
> evhttp_send_reply_chunk(struct evhttp_request *req, struct evbuffer * buf),
> and I want to know if buf represents the chunk itself or the whole data that
> will be sent chunked.
Each call of evbuffer_send_reply_chunk() creates a new chunk filled
with the data provided in buf.
> In the client side, we can set a chunked callback function for a request
> object. Will this function regroup all the sent chunks in a single call to
> recover the data, or have I to write a loop on it??
If you set up a callback for chunks, it will be called for each chunk
received by the client.
Otherwise, without a callback, you will get all the data together at the end.
Niels.
More information about the Libevent-users
mailing list