cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP and multi interface

From: Gil Weber <gilw_at_cse-semaphore.com>
Date: Fri, 08 Jan 2010 14:40:24 +0100

Daniel Stenberg a écrit :
> On Fri, 8 Jan 2010, Gil Weber wrote:
>
>> Another issue that I found that may be related to this problem. At
>> the end on my process I remove the easy handle from the multi
>> interface and then, I clean it up. The problem is that the socket is
>> not closed ! And if I do a netstat it is already in established
>> state. It is only closed if I call "curl_multi_cleanup" function.
>
> No, that's completely unrelated and is fully expected. libcurl caches
> connections to allow you to re-use them again without having to
> reconnect.
>
OK my mistake I didn't know that. But knowing that, is there a way to
force connection to be closed ? I have checked the available options and
I see "CURLOPT_FORBID_REUSE" but this is only usable to close the
connection after the next transfer. But what can I do if I have no more
transfer to do ? Is there a way to do this ? or a
"CURLOPT_DISCONNECT_ONLY" option ?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-08