curl-library
Re: Thoughts on Implementing Persistant Connection Support
Date: Thu, 15 Feb 2001 18:30:56 +0000
Daniel Stenberg wrote:
> 2. An option to determine the strategy used to close persistant connections.
> Strategies can be to close
> o the oldest (from its creation date)
> o the least recently used
> o the one with least traffic
> o round-robin, random, etc.
On second thought, random is probably not a good option. However, I have
two other suggestions.
First
o slowest transfer rate
This is probably a two-edged sword. If the bandwidth is available, then
a slow connection can often be alleviated by re-opening the connection.
If not, it is probably better to keep the connection open, because it
will take long to re-open.
Second
o user-defined
By letting the application determine (through a callback or by assigning
priorities to connections) which connection to close, more "intelligent"
strategies, based on statistics or similar, could be built.
> * Linked list/reallocated array for keeping connections?
Reallocated array is probably simpler, since its size is specified through
an option.
> * We should safely rely on the fact that the function sequence will *always*
> only be one function invoked at a single time using the same curl handle.
> This will be documented, any simultaneous use of the same handle will give
> unknown results.
Agreed.
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-02-15