Commit Graph

3 Commits

Author SHA1 Message Date
Julien BLACHE 7a37732658 Add a variant of evhttp_send_reply_chunk() with a callback on evhttp_write_buffer()
evhttp_write_buffer() used by evhttp_send_reply_chunk() can take callback
executed when (part of) the buffer has been written. Using this callback to
schedule the next chunk avoids buffering large amounts of data in memory.
2009-05-03 11:16:58 +02:00
Julien BLACHE 1ffcbdae27 Add a fail_cb to evhttp_request for connection failures
The callback will be executed if a failure (timeout, read error) is detected
on an incoming connection.

This can be used to detect a client closing the connection while engaged in a
chunked reply and actively pushing chunks to the client. Without this
notification, it is impossible to know if/when a connection gets closed and
react appropriately (ie. stop pushing chunks) resulting in a segfault.
2009-05-03 11:16:57 +02:00
Julien BLACHE 6bce4e08ca Import evhttp from libevent 1.4.10 2009-05-03 11:16:57 +02:00