cURL / Mailing Lists / curl-library / Single Mail


Re: Aborting Data Transfer using libcurl

From: Daniel Stenberg <>
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

> 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 -- --
   [[ Do not send mails to this email address. They won't reach me. ]]
This 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!
Received on 2003-12-08