cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to stop a lengthy operation

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 7 Jan 2004 08:09:30 +0100 (CET)

On Tue, 6 Jan 2004, Adrian Michel wrote:

> > Return an error from a callback: write, read or progress
>
> But if there is no data being received, the callback doesn't get called, so
> how do I stop it then? Also, I understand that the progress callback will be
> removed in the future, so I don't want to count on it. A timeout is not very
> good either, as I wouldn't want curl to disconnect while data is being
> received.

The progress callback will not be removed. I've been contemplating to remove
the default built-in progress meter, not the callback. Does the doc really say
the callback will be removed? If so, it is a bug and we should correct that.

Another option would be to use the CURLOPT_LOW_SPEED_LIMIT option:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTLOWSPEEDLIMIT

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2004-01-07