On Mon, 9 Mar 2009, James Cheng wrote:

I'm using libcurl in a C++ library. My library is called to do HTTP GET's of specified assets. For simplicity of design, each instance of my C++ object has its own curl_multi_handle, adds the curl_easy_handle to it, performs the GET, and then cleans itself up.

[...]

it sounds like my approach is less efficient than having a single global multi handle, because it doesn't reuse open connections? Are there other things that it is not able to reuse? DNS cache?

Exactly. The connection cache and the DNS cache are the ones that hit my mind immediately. I can't recall any other significant differences. You can also still share DNS cache between handles if you use the share interface, even if the handles are parts of different multi handles.

--

 / daniel.haxx.se

Reply via email to