cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Total file length

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Dec 2000 15:41:21 +0100 (MET)

On Mon, 11 Dec 2000, Johan Nilsson wrote:

> I was however a little bit afraid that you were going to remove the
> progress function (?) as stated in the documentation.

What I was talking about then is the internal progress meter code (that
displays the numbers etc), not the ability to "hook" onto it. I have no plans
to remove any current interface call to libcurl.

> I consider the file to be of unknown size as long as dltotal is 0.

That's how it works, yes.

> Another question: Is it only possible to abort a transfer by returning
> anything but 0 from the progress function? This means that if a request
> takes a long time it is not possible to abort the transfer until a
> progresscallback or the request has timed out.

That's unfortunately so. One plan would be to make libcurl open a separate
file descriptor (pipe) for cancellations, to include in the select() loop. A
curl_easy_abort_transfer() call should then be made to write to that file
descriptor and thus make the select() loop discover the request for abortion.

Still, that would require that you have a seperate thread with libcurl's
handle to use as input to that function. Further, that wouldn't work on
windows...

> I think the easy interface is great! It didn't take long to figure it
> out! Great work!

Thanks. With input such as yours, we'll make it even better!

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/curl-library
Received on 2000-12-11