cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Is the progress callback called while libcURL tries to connect?

From: Noel Byron <NoelByron_at_gmx.net>
Date: Wed, 20 Mar 2002 15:39:30 +0100 (MET)

> On Wed, 20 Mar 2002, Noel Byron wrote:
>
> > I'm wondering if my the progress callback is called while libcURL is
> trying
> > to connect.
>
> Uh, no. But I can't think of any good reason why we shouldn't start doing
> it.
> Are you up for adding the call and providing a patch?

I will do my best. But it may take one or two weeks since my C skills
are a little bit 'rusty' at the moment. I could also add a parameter
to set the time intervall for the progress function? Until now it is
one second, I think. It could be userfull to change it... for information
freaks like me...
:o)

> > I have to do the timeout stuff myself using my own progress function.
>
> Then I figure it would be just perfect to get the progress callback
> there...!
> :-)

Yop. ;o)

> > Furthermore, is there a callback for a 'connected' event?
>
> Nope. You think we need one?

Well, I dazzlingly thought it might be usefull in the following
circumstance:
libcURL got the connection to the remote host, but the host does not send
data
in time. In this situation I would abort the transfer in the progress
function.
But what shall I report to the user? Could not connect or the server has
not send any data in time? I'm no networking geek and I don't know how
often this happens. But this happens quite often when I browse through
the internet with Netscape.

Or is it possible to gather this status (connected or not) in the progress
function? Maybe by the use of the CURL handle? Is a status associated
with the CURL handle... I will look at the code.

You should know, I want to use libcURL in a multithreaded GUI app.
And I want to provide as much information as possible to the user (hostname
resolved, connected, download status and so on...).

Kind regards,
Noel

BTW: great library, easy to build, easy to use and reliable.

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
Received on 2002-03-20