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

curl-and-php

Re: connection not resuming

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

* Daniel Stenberg <daniel_at_haxx.se> [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
indefinitely.

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, http://mmj.dk
"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.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-03-04