AcceptLimiter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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 
16 namespace Comm
17 {
18 
30 {
31 
32 public:
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 
45 private:
47  std::deque<TcpAcceptor::Pointer> deferred_;
48 };
49 
50 }; // namespace Comm
51 
52 #endif /* SQUID_SRC_COMM_ACCEPTLIMITER_H */
53 
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
Definition: AcceptLimiter.h:16
std::deque< TcpAcceptor::Pointer > deferred_
Definition: AcceptLimiter.h:47
static AcceptLimiter & Instance()
void defer(const TcpAcceptor::Pointer &afd)
void removeDead(const TcpAcceptor::Pointer &afd)

 

Introduction

Documentation

Support

Miscellaneous