cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Time-outs in libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 Sep 2006 12:15:24 +0200 (CEST)

On Fri, 8 Sep 2006, Richard van der Klooster wrote:

> I set the CURLOPT_TIMEOUT value to 10 minutes. This works very nicely for
> normal http requests etc. but when I receive a file via ftp it also times
> out after 10 minutes. This is not what I want. Then I changed timeout for
> ftp to 2 hours. Now that's working fine but when no data is received because
> of a server error the timeout takes 2 hours also.

CURLOPT_TIMEOUT is the same not matter what protocol or transfer situation.

> Is there a way in libcurl to have it timeout after a short time when no
> longer receiving data while still being able to receive large files that can
> take 2 hours?

CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME perhaps?

http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTLOWSPEEDLIMIT

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-09-08