cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] Connection bundles

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Thu, 06 Dec 2012 17:25:55 +0100

Hi all!

Here is a new implementation of the persistent connection cache. Instead
of a simple linked list of connections, it is now a hash with connection
lists (called "bundles"), using the hostname as the key. Each list, or
"bundle", contains all open connections to the specific host.

This makes the search for a connection faster, since we check fewer
connections in ConnectionExists().

However, this is not the primary goal for the bundles. The main purpose
for the connection bundles are to prepare for my next patch, which will
add multiple HTTP pipelines with load balancing, and configurable limits
for the number of open connections.

I have added one more thing to this patch, and that is the removal of
the closure list in the multi interface. Instead of keeping presumably
closed easy handles around for closure, we explicitly allocate a
separate easy handle for this purpose.

Enjoy!

Linus Nielsen Feltzing

Received on 2012-12-06