#include <AcceptLimiter.h>

Collaboration diagram for Comm::AcceptLimiter:

Public Member Functions

void defer (const TcpAcceptor::Pointer &afd)
void removeDead (const TcpAcceptor::Pointer &afd)
void kick ()

Static Public Member Functions

static AcceptLimiterInstance ()

Private Attributes

std::deque< TcpAcceptor::Pointerdeferred_

Static Private Attributes

static AcceptLimiter Instance_

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 25 of file AcceptLimiter.cc.

References debugs.

Referenced by Comm::TcpAcceptor::doAccept().

◆ Instance()

Comm::AcceptLimiter & Comm::AcceptLimiter::Instance ( )

retrieve the global instance of the queue.

Definition at line 19 of file AcceptLimiter.cc.

References Instance_.

Referenced by comm_close_complete(), comm_init(), 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 45 of file AcceptLimiter.cc.

References debugs, Comm::TcpAcceptor::okToAccept(), and CbcPointer< Cbc >::valid().

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 32 of file AcceptLimiter.cc.

References debugs.

Referenced by Comm::TcpAcceptor::swanSong().

Member Data Documentation

◆ deferred_

std::deque<TcpAcceptor::Pointer> Comm::AcceptLimiter::deferred_

FIFO queue

Definition at line 49 of file AcceptLimiter.h.

◆ Instance_

Comm::AcceptLimiter Comm::AcceptLimiter::Instance_

Definition at line 46 of file AcceptLimiter.h.

Referenced by Instance().

The documentation for this class was generated from the following files:






Web Site Translations