]> git.ipfire.org Git - thirdparty/squid.git/commit - src/adaptation/icap/ServiceRep.cc
Upgrade ICAP persistent connection handling
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 17 Jun 2011 02:14:01 +0000 (14:14 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 17 Jun 2011 02:14:01 +0000 (14:14 +1200)
commitf915be8d04d0ea6009e388b2b4a9f49be34e3ba3
tree74d2f465417ae68d5eec5946c641e4396c1a69b4
parent276e8615d6ffd9084393881263eb34cb52c2fa66
Upgrade ICAP persistent connection handling

ICAP services use a "service" model of pconn different from the
"TCP destination" model which PconnPool objects are designed for.

This patch alters Adaptation::Icap::ServiceRep to use the simpler
IdleConnList object for pconn storage. IdleConnList stores a
"set of idle connections" more compatible with the ICAP model.

In order to implement ICAP max-connections feature the closeN()
operation is added to IdleConnList.

The result is removal of the complex hash and management operations on
push/pop of the idle conn set. The only expected behaviour change is
more frequent re-use of idle connections on services with multiple IP
addresses. Speed gains are minimal, but positive.
src/adaptation/icap/ServiceRep.cc
src/adaptation/icap/ServiceRep.h
src/pconn.cc
src/pconn.h