cURL / Mailing Lists / curl-library / Single Mail

curl-library

Question on reusing connections.

From: Ben Greear <greearb_at_candelatech.com>
Date: Wed, 19 Jul 2006 16:15:53 -0700

I am trying to allow re-use of a connection. My code sets
CURLOPT_FORBID_REUSE to 0 (zero), sets up the rest of the options,
including callbacks so that I can save the info to a local file descriptor,
and then falls into a loop where it downloads a URL over and over (with
about 1 second between each requests.) For the current test, the URL does
not change, but it is set each time with curl_easy_setopt(curl, CURLOPT_URL, ...)
to the same value.

 From what I can tell, it is making a new connection to my web server for
each request..where I was thinking it should be reusing the TCP connection.

Are there any constraints on re-using connections when using call-backs
to save the data to a local file or time-outs between setting the URL
and doing another curl_easy_perform()?

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
Received on 2006-07-20