On Tue, Aug 7, 2012 at 12:28 AM, Nitin Kumar Saxena <[email protected]> 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

Reply via email to