curl-library
Re: [PATCH] new connect status callback
Date: Tue, 2 Feb 2010 22:34:19 +0100 (CET)
On Tue, 2 Feb 2010, Nick Jensen wrote:
> I've attached a small patch for curl-7.9.17 which is based on the
> connect-progress-2.patch created by Dan Stenberg that is posted here
> http://curl.haxx.se/mail/lib-2010-01/0077.html
Thanks for your interest and will to help us improve libcurl. I'm however far
from convinced this callback is what we need.
Can you elaborate on the use-case you see this providing a useful value for?
> Basically instead of invoking the progress callback during the connect
> process and sending 0 values for all the speed arguments, I've created
> a couple new curl options called CURLOPT_CONNECTINGFUNCTION, and
> CURLOPT_CONNECTINGDATA. Using these will allow you to delegate
> progress info and connect status info separately in your applications.
In reality, isn't the current callbacks 0 values basically the same as "still
connecting" ?
> The function gets invoked after DNS resolution when curl tries to
> connect to an IP address.
But why after DNS resolution? So it'll first call the regular progress
callback N number of times with a 0 value, then start calling the connect
callback? Another detail: what is "connecting" really? I figure you'd need to
specify that this is the actual TCP connection handshake we're talking about,
as many application layer protocols have a "connect part" that users may
consider be part of the connect phase. Also, when connections are re-used that
callback is completely skipped over.
Another little detail: the current CVS has changed those parts since 7.19.7 so
I doubt your patch applies cleanly.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-02-02