Squid Web Cache master
Loading...
Searching...
No Matches
AcceptLimiter.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_SRC_COMM_ACCEPTLIMITER_H
10#define SQUID_SRC_COMM_ACCEPTLIMITER_H
11
12#include "comm/TcpAcceptor.h"
13
14#include <deque>
15
16namespace Comm
17{
18
30{
31
32public:
34 static AcceptLimiter &Instance();
35
37 void defer(const TcpAcceptor::Pointer &afd);
38
40 void removeDead(const TcpAcceptor::Pointer &afd);
41
43 void kick();
44
45private:
47 std::deque<TcpAcceptor::Pointer> deferred_;
48};
49
50}; // namespace Comm
51
52#endif /* SQUID_SRC_COMM_ACCEPTLIMITER_H */
53
void defer(const TcpAcceptor::Pointer &afd)
std::deque< TcpAcceptor::Pointer > deferred_
void removeDead(const TcpAcceptor::Pointer &afd)
static AcceptLimiter & Instance()
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.