Re: [Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-18 Thread Patrick C
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

Re: [Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-18 Thread Krzysztof Adamski
Dnia 2009-11-18, śro o godzinie 10:40 -0800, Niels Provos pisze: > On Mon, Nov 16, 2009 at 9:12 AM, Krzysztof Adamski wrote: > > i would like to build simple HTTPD server using libevent2. It is going > > to send some quite big files but i would like it to handle couple > > concurrent connections.

Re: [Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-18 Thread Niels Provos
On Mon, Nov 16, 2009 at 9:12 AM, Krzysztof Adamski wrote: > i would like to build simple HTTPD server using libevent2. It is going > to send some quite big files but i would like it to handle couple > concurrent connections. The files can be sent in chunks so I'm using > evhttp_send_reply_chunk fo

Re: [Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-17 Thread Niels Provos
On Mon, Nov 16, 2009 at 6:43 PM, Patrick C wrote: > 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. The way you would do this in libevent 2.0 is to use evbuffer_add_file() and then send tha

Re: [Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-17 Thread Krzysztof Adamski
Dnia 2009-11-17, wto o godzinie 04:21 +0200, Tero Marttila pisze: > One option is to add the functionality to evhttp. So there is no existing functionality for this, right? > I don't have any concrete patches to post, but when I tried this a > (long) while ago, it was fairly straightforward, just

Re: [Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-16 Thread Patrick C
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

Re: [Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-16 Thread Tero Marttila
Krzysztof Adamski wrote: Hi, i would like to build simple HTTPD server using libevent2. It is going to send some quite big files but i would like it to handle couple concurrent connections. The files can be sent in chunks so I'm using evhttp_send_reply_chunk for this. The problem is, how can I se

[Libevent-users] Handling concurent evhttp connections with evhttp_send_reply_chunk.

2009-11-16 Thread Krzysztof Adamski
Hi, i would like to build simple HTTPD server using libevent2. It is going to send some quite big files but i would like it to handle couple concurrent connections. The files can be sent in chunks so I'm using evhttp_send_reply_chunk for this. The problem is, how can I send big files while still be