cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Flag to know if the curl object used apreviouslyopenedconnection

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 14 Oct 2004 20:39:34 +0200 (CEST)

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
Received on 2004-10-14