cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: CURLOPT_CONNECT_ONLY and CURLOPT_FORBID_REUSE

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 29 May 2009 10:43:23 +0200 (CEST)

On Thu, 28 May 2009, junk_at_igrspace.com wrote:

> when i set CURLOPT_CONNECT_ONLY and CURLOPT_FORBID_REUSE the connection is
> closed right after getting connected.

Exactly. CURLOPT_FORBID_REUSE also implies that libcurl will close that
connection asap after its done.

> Is there a way to use CURLOPT_CONNECT_ONLY and then manually close the
> connection after i'm done with curl_easy_send() and curl_easy_recv() ?

Yes, by not using CURLOPT_FORBID_REUSE. But you must not close it yourself,
you should let curl_easy_cleanup() close it.

-- 
  / daniel.haxx.se
Received on 2009-05-29

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET