cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl Timeout setting

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Tue, 7 Aug 2012 02:20:33 -0500

On Tue, Aug 7, 2012 at 12:28 AM, Nitin Kumar Saxena <nitinks_at_adobe.com> wrote:

> I only need to detect network drop in between a curl transfer. At first, I
> used CURLOPT_TIMEOUT but it seems to consider complete transfer time(which
> is indeterminate in this case and can take multiple minutes) rather than
> time in between two response chunks.

> Is there any libcurl option to detect netwrk drop and solve this issue ?

There is no option in curl to "detect network drop" but you can use
CURLOPT_LOW_SPEED_LIMIT[1] and CURLOPT_LOW_SPEED_TIME[2]
together to better control the timeout behavior.

[1] http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTLOWSPEEDLIMIT
[2] http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTLOWSPEEDTIME

 - Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-07