cURL / Mailing Lists / curl-library / Single Mail


Re:Re: may i change the time of CURLE_OPERATION_TIMEDOUT

From: belle <>
Date: Tue, 17 May 2011 14:08:57 +0800

>> i use the libcurl to download the mp4 file, but when the network is
>> not good,i found it need to use about 60 seconds to abort the connect
>> status(the connect is completed, and it had been download some datas,
>> but after a while there is no data), and the return response reason
>>is 28 CURLE_OPERATION_TIMEDOUT, i want to know if i can change the
>>time to wait, or i can set an option to make the curl abort
>>immediately when the network is not good?

> There are several different timeout options for libcurl and
> additionally you can abort the operation using the callbacks at your
> own will as well.

> "when the network is not good" is not a detectable situation as
> there's no definition for such a network.

  o, you are right, there's no definition for such a network, i used the
wrong description. what i mean is "when network is broken, the function
curl_easy_perform is not return and the CURLOPT_WRITEFUNCTION callback
is not receive data anymore, that is the callback will be not used anymore,
so i can't actively abort the operation, is there any other callback i
can use to make the curl_easy_perform return immediately when the network is

List admin:
Received on 2011-05-17