cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Thoughts on Implementing Persistant Connection Support

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 24 Feb 2001 17:06:15 +0100 (MET)

On Fri, 23 Feb 2001, Rick Jones wrote:

> i would likely be using this functionality in a benchmark, where I am
> trying to get the number of URL's per connection to match some measured
> workload. it would be _sufficient_ to have the connection close just on a
> curl_easy_cleanup (whatever the right name is ) but it would be nice to
> allow the app to say "close the connection" without blowing away the
> entire handle.

Are you then talking about a special "close my last connection" function to
use after the *perform() function has been called?

My plan is to have an option to set the maximum amount of concurrently opened
connections. If this is set to 0, no connections will ever be kept open
(they'll be closed "by force" after each transfer). Having it set to 1 will
make curl keep the connection open between multiple requests in case the
following request can be performed using the same connection. Any other
number will make curl have a "connection cache" with possibly open
connections to re-use on following requests using the same handle.

> i would not expect there to be more than one connection associated with a
> given curl handle, so i would not be expecting to have to select between
> connections on a given handle.

With the upcoming system, you can do multiple requests using the same handle.
You just run *perform() again without doing any *cleanup().

> i am assuming I could have more than one handle per thread of execution,
> but am not at this time expecting to do so.

Multiple handles will of course always be possible, but that doesn't really
affect us here and now.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-02-24