cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Aborting Data Transfer using libcurl

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 8 Dec 2003 15:25:23 +0100 (CET)

On Mon, 8 Dec 2003, Pravin Jade wrote:

> I am making PROGRESS_CALLBACK to return non-zero value to abort uploading of
> file. But I suspect PROGRESS_CALLBACK is not being called at regular
> interval.

Can you be more specific? You say you "suspect" this while I suspect the
opposite! ;-)

> So sometimes it aborts uploading after all data has been uploaded, which is
> of no use.

Uh, so why don't you abort from the write callback then? It'll abort faster
then...

> Another question is how to know current speed of data transfer ? I searched
> document but not found any option for this.

libcurl doesn't provide that answer to you. Partly because there are so many
ways to do the math and partly because you already have all the facts: you
know when the transfer starts and you know how much data that has been
transfered since.

-- 
    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 2003-12-08