[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Delivery of chunked response delayed until evhttp_send_reply_end()



I am doing an experiment where I call evhttp_send_reply_start(), then
several evhttp_send_reply_chunk()s, with some delay (like 1 second)
before each call, and then a final evhttp_send_reply_end().

The expected behavior is that the headers will be sent, then each chunk
will be sent with a second delay before seeing the data for that chunk,
then the end of the response will be sent.

Instead, the behavior that I am seeing is that nothing is sent for the
total of all delays (say for 5 seconds if there are 5 chunks), and then
everything is sent all at once when evhttp_send_reply_end() is called.

I am missing something?  Am I using the calls correctly?  Should I be
flushing something after each evhttp_send_reply_chunk() call?  Or is
this expected? (if so, it kind of defeats the purpose of a chunked
response).

Thanks,
-- 
Heath Caldwell
hncaldwell@xxxxxxxxx
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.