On Tue, 22 Nov 2011, Tejas Shah wrote:
I am adding 10 easy handles to a multi handle, all with the same server url. When I do a multi perform on the multi handle, 10 connections are opened. I was under the impression that multi handles had connection pools and reused connections when possible. How can I enforce use of one connection for all 10 of these easy handles?
If you open then one after the other, after the previous request was completed, then it will re-use the same connection. It can't re-use the connection simultaneously unless you enable pipelining and use the correct set of HTTP requests.
Also, you can make the connection not re-usable depending on what options you set, what your program does and depending on what the server does.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html