As Nick said, the libevent source itself is a great example of abstracting
poll() functionality on multiple platforms, using the locally optimized
methods of epoll, kqueue, etc depending on the operating system. This is
primarily designed for high-performance network daemons (and sometimes
clients)
I wouldn't use them for sending large files. Use the good 'ole fashion
event_* interfaces for checking when a socket needs more data, and use
sendfile() to send the data down the socket when it needs it. No reason to
have libevent buffers on top of things for this purpose.
You have basically the s
Agreed. The most optimal way of doing this would be to use your operating
system's sendfile() routine, where available, in the evhttp_write_cb
routine.
-Patrick
2009/11/16 Tero Marttila
> Krzysztof Adamski wrote:
>
>> Hi,
>> i would like to build simple HTTPD server using libevent2. It is going