cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Flag to know if the curl object used apreviouslyopenedconnection

From: Guillaume Arluison <ga_at_lacde.net>
Date: Fri, 15 Oct 2004 17:39:37 +0100

> I came to think of an even better: CURLINFO_NUM_CONNECTS
>
> Return the number of new connections made in the last request. So, if
there
> was a single connection that was re-used, the counter would be 0 and for
every
> new connection made it would be increased. That would typically be 1, but
can
> be a larger number if there's a number of redirects.
Oups, actually I started on that and then forgot it when I went further for
the complex table corresponding to true/false for each connection in the
right order.

I suppose we dont really care about this "order", the information about how
many connects had to be created is sufficient enough for everyone ?

So Ill do that :
forget CURLINFO_REUSED_CONNECTION
add CURLINFO_NUM_CONNECTS

Ill wait until monday if anybody else have any preference (joerg ?).
____________________
<Gu>[W]ill[i]a<u>m<e>
http://www.lacde.net
----- Original Message -----
From: "Daniel Stenberg" <daniel-curl_at_haxx.se>
To: "libcurl development" <curl-library_at_cool.haxx.se>
Sent: Thursday, October 14, 2004 7:39 PM
Subject: Re: Flag to know if the curl object used
apreviouslyopenedconnection

> On Wed, 13 Oct 2004, Guillaume Arluison wrote:
>
> > If we still want to debate on a third (or more) state I can also propose
> > something more clever mixed with CURLINFO_REDIRECT_COUNT.
> > option B) use the bits of the long :
> > each bit for each redirect saying
> > 0 -> had to create a connection
> > 1 -> reused a previously opened connection
>
> I came to think of an even better: CURLINFO_NUM_CONNECTS
>
> Return the number of new connections made in the last request. So, if
there
> was a single connection that was re-used, the counter would be 0 and for
every
> new connection made it would be increased. That would typically be 1, but
can
> be a larger number if there's a number of redirects.
>
> > Let me know for which option A, C or even B you re up.
>
> I personally have no use for any of these options, I'm hoping for you or
> anyone else to say "I prefer THIS".
>
> > And if needed your wish about enums/simple defines for the long/char
>
> I'm fine with either way. curl_easy_getinfo() will "return" a long anyway.
>
> --
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.764 / Virus Database: 511 - Release Date: 16/09/2004
Received on 2004-10-15