cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to Disconnect ?

From: Nilesh <nilesh_at_kenati.com>
Date: Fri, 02 Jun 2006 13:20:11 +0530

Thanks for quick reqsponse !

If I have one easy_handle added into multi_handle and connection was
established with curl_multi_perform, so cleanup is required on both
handle or curl_easy_cleanup is just fine.

Another thing wanted to confirm is, once I do either easy or multi
cleanup, do I again need to set all options required ( which were
allready set ) to reconnect and start transfer again ?

So setting CURLOPT_FORBID_REUSE will terminate the connection immediatly
after curl_easy/multi_perform ?

Can custom HTTP header addition (using curl_slist_append) "Connection :
Close" help ?

--
Nilesh
Daniel Stenberg wrote:
> On Fri, 2 Jun 2006, Nilesh wrote:
>
>> How to disconnect from the URL to which connection might have already 
>> established ?
>> I want to explicitely disconnect for that URL ?
>>
>> Would cleaup function on handles( multi/easy) and global cleanup 
>> suffice ?
>
>
> The curl_easy_cleanup() will always close any possibly still open 
> connections.
>
> You can also set the CURLOPT_FORBID_REUSE option which should make the 
> connection get closed immediately after use.
>
Received on 2006-06-02