HTTP Connection Class
Use to hold HTTP Connections.
This class is based on ConnCache.pm, although this a much lighter version. <http://search.cpan.org/author/GAAS/libwww-perl-5.65/lib/LWP/ConnCache.pm> from the libwww-perl collection <http://www.linpro.no/lwp/>.
Example:
1 $conn_cache =& new HTTP_Connection_Cache();
2 $conn_cache->deposit($key, $sock);
3 $connection =& $conn_cache->withdraw($key);
See test_HTTP_Connection_Cache.php for more examples
TODO:
Located in Program_Root/HTTP_Connection_Cache.php (line 49)
Constructor.
The only option currently accepted is 'total_capacity'. Example:
1 $conn_cache =& new HTTP_Connection_Cache(array('total_capacity' => 5));
associative array
Deposit connection
(passed by ref)
Remove connection (doesn't disconnect, just removes from cache)
Set total capacity.
Connections will start to be dropped when this limit is reached. If set to 0, then all connections are immediately dropped.
Withdraw connection
Example:
1 $key = 'www.k1m.com:80';
2 $connection =& $conn_cache->withdraw($key);
Documention generated on Wed, 16 Jul 2003 01:03:19 +0100 by phpDocumentor 1.2.0