|
Squid Web Cache master
|
#include <AcceptLimiter.h>
Public Member Functions | |
| void | defer (const TcpAcceptor::Pointer &afd) |
| void | removeDead (const TcpAcceptor::Pointer &afd) |
| void | kick () |
Static Public Member Functions | |
| static AcceptLimiter & | Instance () |
Private Attributes | |
| std::deque< TcpAcceptor::Pointer > | deferred_ |
FIFO Queue holding listener socket handlers which have been activated ready to dupe their FD and accept() a new client connection. But when doing so there were not enough FD available to handle the new connection. These handlers are awaiting some FD to become free.
defer - used only by Comm layer ConnAcceptor adding themselves when FD are limited. removeDead - used only by Comm layer ConnAcceptor to remove themselves when dying. kick - used by Comm layer when FD are closed.
Definition at line 29 of file AcceptLimiter.h.
| void Comm::AcceptLimiter::defer | ( | const TcpAcceptor::Pointer & | afd | ) |
delay accepting a new client connection.
Definition at line 24 of file AcceptLimiter.cc.
References debugs.
Referenced by Comm::TcpAcceptor::doAccept().
|
static |
retrieve the global instance of the queue.
Definition at line 17 of file AcceptLimiter.cc.
Referenced by comm_close_complete(), Comm::TcpAcceptor::doAccept(), and Comm::TcpAcceptor::swanSong().
| void Comm::AcceptLimiter::kick | ( | ) |
try to accept and begin processing any delayed client connections.
Definition at line 44 of file AcceptLimiter.cc.
References debugs, Comm::TcpAcceptor::okToAccept(), and CbcPointer< Cbc >::valid().
Referenced by comm_close_complete().
| void Comm::AcceptLimiter::removeDead | ( | const TcpAcceptor::Pointer & | afd | ) |
remove all records of an acceptor. Only to be called by the ConnAcceptor::swanSong()
Definition at line 31 of file AcceptLimiter.cc.
References debugs.
Referenced by Comm::TcpAcceptor::swanSong().
|
private |
FIFO queue
Definition at line 47 of file AcceptLimiter.h.