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

curl-and-php

Re: connection not resuming

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 4 Mar 2008 16:38:46 +0100 (CET)

On Tue, 4 Mar 2008, Mads Martin Joergensen wrote:

>>> 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:

Oh, right. I didn't read your question properly it seems. You're right, that
timeout will not be what you want. But libcurl provides no particular timeout
for the "connected but not yet provided any data" state.

> 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.

Those values don't "report" speeds at all, but I figure you mean to ask if
they will take effect immediately or at a certain point, and the answer is
(I think) that they start working immediately after the connection is
established.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-03-04