lesa Le <lesale25 <at> gmail.com> writes: > What I'm currently working on is some kind of a connection pool. I'd like to > avoid opening a new connection for every request, but I'm trying to find the > most efficient way to do this. > > Does anyone have any ideas on how to do this? > Thanks.
The status of keep-alive support in evhttp and libevhtp ( cf. https://github.com/ellzey/libevhtp/blob/master/examples/test_client.c ) is unknown to me. That's why I prefer to use libcurl in situations where keep-alive is required. Libcurl has a docummented support for keep-alive, it should reuse the connection as long as you use the same easy or multi handle. The thing is called "HTTP pipelining" in libcurl, BTW. http://daniel.haxx.se/blog/2013/03/26/better-pipelining-in-libcurl-7-30-0/ And here is my clumsy (but working, so far) attempt at using libcurl with libevent if you want to use it that way: http://code.google.com/p/libglim/source/browse/trunk/runner.hpp _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://lists.monkey.org:8080/listinfo/libevent-users