#include <AcceptLimiter.h>
![Collaboration graph](classComm_1_1AcceptLimiter__coll__graph.png)
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_ |
Detailed Description
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.
Member Function Documentation
◆ defer()
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().
◆ Instance()
|
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().
◆ kick()
void Comm::AcceptLimiter::kick | ( | ) |
try to accept and begin processing any delayed client connections.
Definition at line 44 of file AcceptLimiter.cc.
References debugs, and Comm::TcpAcceptor::okToAccept().
Referenced by comm_close_complete().
◆ removeDead()
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().
Member Data Documentation
◆ deferred_
|
private |
FIFO queue
Definition at line 47 of file AcceptLimiter.h.
The documentation for this class was generated from the following files:
- src/comm/AcceptLimiter.h
- src/comm/AcceptLimiter.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products