curl-library
Re: connection re-use amongst easies
Date: Thu, 28 May 2009 06:23:58 -0700
On Thu, 28 May 2009 13:01:06 +0200 (CEST), Daniel Stenberg <daniel_at_haxx.se>
wrote:
> On Thu, 28 May 2009, junk_at_igrspace.com wrote:
>
>> is libcurl supposed to re-use connections over different easy handles ?
>> (when using multi interface) In other words, are connections preserved
>> by the multi-handle after cleanup of the easy handle ?
>
> Yes, that's exactly how it works.
I found that when a connection is re-used over easies that
had CURLOPT_CONNECT_ONLY set, a curl_easy_getinfo() for
CURLINFO_LASTSOCKET fails (returning -1) for the subsequent easy.
curl_test.cpp is a small program illustrating the issue giving
curl_connectonly.out as output. When omitting CURLOPT_CONNECT_ONLY, i get
curl_perform.out, where the socket is returned correctly.
Can you reproduce it ?
Immanuel
- text/plain attachment: curl_test.cpp
- application/octet-stream attachment: curl_connectonly.out
- application/octet-stream attachment: curl_perform.out