cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Another libcurl question

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 21 May 2001 23:28:20 +0200 (MET DST)

On Mon, 21 May 2001, Joel DeYoung wrote:

[ CC'ed to the libcurl mailing list, as I think it is an excellent question
that others might have an interest in. ]

> We exchanged some e-mails a while back about libcurl and Win32. I'm
> using it for my webcam application, DeskCam.
>
> Anyway, it's all working great. I had a question, though. I get
> progress callbacks while a download is occuring. I use these callbacks
> as a hook to service user abort requests, which also works great. The
> only problem with it is that I don't get called back until the download
> itself begins. If libcurl is in the process of connecting or resolving a
> hostname, there are no callbacks. Sometimes this connection or name
> resolution can take quite a while, mostly due to there being some kind of
> connectivity problem. I would like my users to be able to abort the
> connection under these circumstances, but I don't get a progress
> callback, so I can't.
>
> Is there some way to include some kind of heartbeat callback during these
> pre-download operations?

The short answer is no, there is none.

libcurl does synchronous name lookups, why it couldn't do any callbacks while
looking up names, but apart from that it should be possible to design a
system like the one you describe. We do in fact also feature non-blocking
connects these days (for windows only at this point though) so we could do
them even while connecting to very slow remote sites.

I'd welcome patches or more thoughts on how this could be implemented.

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-05-21