]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/comm/AcceptLimiter.h
1 #ifndef _SQUID_SRC_COMM_ACCEPT_LIMITER_H
2 #define _SQUID_SRC_COMM_ACCEPT_LIMITER_H
12 * FIFO Queue holding listener socket handlers which have been activated
13 * ready to dupe their FD and accept() a new client connection.
14 * But when doing so there were not enough FD available to handle the
15 * new connection. These handlers are awaiting some FD to become free.
17 * defer - used only by Comm layer ListenStateData adding themselves when FD are limited.
18 * kick - used by Comm layer when FD are closed.
24 /** retrieve the global instance of the queue. */
25 static AcceptLimiter
&Instance();
27 /** delay accepting a new client connection. */
28 void defer(Comm::TcpAcceptor
*afd
);
30 /** remove all records of an acceptor. Only to be called by the ConnAcceptor::swanSong() */
31 void removeDead(const Comm::TcpAcceptor
*afd
);
33 /** try to accept and begin processing any delayed client connections. */
37 static AcceptLimiter Instance_
;
40 Vector
<Comm::TcpAcceptor
*> deferred
;
45 #endif /* _SQUID_SRC_COMM_ACCEPT_LIMITER_H */