cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: hi, Can you add progress callback notify when connect?

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Sat, 11 Jul 2009 14:39:02 -0500

2009/7/11 Daniel Stenberg <daniel_at_haxx.se>

> On Sat, 11 Jul 2009, °×Áú wrote:
>
> Can you divide the connect timeout to multi part, and notify progress
>> callback to user, let user cancel by callback return value?
>>
>
> Sorry, I don't understand. Can you try to rephrase the question or possibly
> show details with an example?

I *think* what he wants is for the progress callback to be called from time
to time while a connect is in progress, with the possibility for the program
to pass back a request to abandon the connect before it completes.

For example, suppose you specify 30 second timeout on a page fetch - perhaps
every 5 seconds the progress callback would be called with a "still trying
to connect" status. After maybe 20 seconds the program somehow decides that
it waited long enough, and cancels the request.

I suppose that would give the program some flexibility in deciding when to
bail out.

Ralph Mitchell
Received on 2009-07-11