cURL / Mailing Lists / curl-and-php / Single Mail


Re: connection not resuming

From: Mads Martin Joergensen <>
Date: Tue, 4 Mar 2008 14:04:01 +0100

* Daniel Stenberg <> [Mar 04. 2008 13:52]:
> > What curl option would be the correct to set, if I want curl to timeout if
> > it's been waiting n seconds on a server reply?
> A suitable libcurl option is CURLOPT_CONNECTTIMEOUT.

But when reading the manual it says:

The number of seconds to wait whilst trying to connect. Use 0 to wait

And my netstat shows my connections in ESTABLISHED. Wouldn't that render
the CURLOPT_CONNECTTIMEOUT wrong, since the cmd-line manual says:

 Maximum time in seconds that you allow the connection to the server to
 take. This only limits the connection phase, once curl has connected
 this option is of no more use. See also the -m/--max-time option.

The --max-time is of no good either since it might take 45 minutes for a
valid transfer. It might take 60 seconds.

We're contemplating a combination of --speed-time and --speed-limit, but
we're wondering if it only reports the speed if it recieves data, or it
does all the time.

Mads Martin Joergensen,
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                 -- A. P. J.
Received on 2008-03-04