cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: include file + progress + abort

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 14 Dec 2000 08:56:25 +0100 (MET)

On Wed, 13 Dec 2000, Johan Nilsson wrote:

> I'm using the 7.5 version of libcurl for (RedHat) Linux. I've compiled
> the source myself and it worked fine but when I use curl.h in my
> application I have to add a #include <stdio.h> to the curl.h file becuase
> otherwise the compiler cannot find the definition for FILE...

Ah, I should add that include in curl.h.

> How often is a progress callback triggered?

No more than once per second. And hopefully not with much longer intervals
either.

> I only use ftp and http and the only drawback I can think of so far is
> the abort mechanism. I really think we should try to figure out a new way
> to abort a transfer (just as Daniel said in an earlier mail) if for
> example a request is waiting to timeout.

I'm open for ways to solve this problem.

> I haven't tested this yet but does libcurl abort if I don't return the
> correct number of bytes "written" in my write function.

Yes, that's considered an error.

> If so is it safe to do so, i.e. I can do a cleanup so I don't have to
> wait for the next progress callback.

Well, the libcurl function will return an error code, write error something.
Other than that, it should be perfectly possible.

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