7#ifndef TCP_CONNECTION_POOL_H
8#define TCP_CONNECTION_POOL_H
74 size_t& total_connections);
101 size_t& total_connections);
The IOAddress class represents an IP addresses (version agnostic)
Pool of active TCP connections.
void stopAll()
Stops all connections and removes them from the pool.
void stop(const TcpConnectionPtr &connection)
Removes a connection from the pool and stops it.
void stopAllInternal()
Stops all connections and removes them from the pool.
size_t usedByRemoteIp(const asiolink::IOAddress &remote_ip, size_t &total_connections)
Returns the number of connections using a given remote IP address.
static std::atomic< uint64_t > rejected_counter_
Class/static rejected (by the accept filter) connection counter.
size_t usedByRemoteIpInternal(const asiolink::IOAddress &remote_ip, size_t &total_connections)
Returns the number of connections using a given remote IP address.
static std::atomic< uint64_t > stopped_counter_
Class/static stopped (i.e. removed from pool) connection counter.
void shutdown(const TcpConnectionPtr &connection)
Removes a connection from the pool and shutdown it.
std::mutex mutex_
Mutex to protect the internal state.
void start(const TcpConnectionPtr &connection)
Start new connection.
static std::atomic< uint64_t > started_counter_
Class/static started (i.e. added to pool) connection counter.
TcpConnectionList connections_
Set of connections.
boost::shared_ptr< TcpConnection > TcpConnectionPtr
Pointer to the TcpConnection.
std::list< TcpConnectionPtr > TcpConnectionList
Type of TCP connection pointer list.
Defines the logger used by the top-level component of kea-lfc.