cURL / Mailing Lists / curl-library / Single Mail


Re:Re: may i change the time of CURLE_OPERATION_TIMEDOUT

From: Daniel Stenberg <>
Date: Tue, 17 May 2011 11:44:20 +0200 (CEST)

On Tue, 17 May 2011, belle wrote:

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

"network is broken" is similarly not an exact situation.

Are you meaning when the connection is broken physically by you pulling the

Recall that TCP is generally a protocol that is designed not to care if the
connection is broken. It can continue very well once you put the cable back in

> 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 broken?

Use the progress callback or one of the many timeout options.

List admin:
Received on 2011-05-17