NCBI C++ ToolKit
|
Search Toolkit Book for CServer_ConnectionPool
#include "connection_pool.hpp"
(Private to src/connect
.)
Public Types | |
typedef IServer_ConnectionBase | TConnBase |
typedef CServer_Connection | TConnection |
typedef CServer_Listener | TListener |
Public Member Functions | |
CServer_ConnectionPool (unsigned max_connections) | |
~CServer_ConnectionPool () | |
void | SetMaxConnections (unsigned max_connections) |
bool | Add (TConnBase *conn, EServerConnType type) |
void | Remove (TConnBase *conn) |
bool | RemoveListener (unsigned short port) |
void | PingControlConnection (void) |
void | SetConnType (TConnBase *conn, EServerConnType type) |
Guard connection from out-of-order packet processing by pulling eActiveSocket's from poll vector Resets the expiration time as a bonus. More... | |
void | SetAllActive (const vector< CSocketAPI::SPoll > &polls) |
void | SetAllActive (const vector< IServer_ConnectionBase * > &conns) |
void | CloseConnection (TConnBase *conn) |
Close connection as if it was initiated by server (not by client). More... | |
void | Erase (void) |
Erase all connections. More... | |
bool | GetPollAndTimerVec (vector< CSocketAPI::SPoll > &polls, vector< IServer_ConnectionBase * > &timer_requests, STimeout *timer_timeout, vector< IServer_ConnectionBase * > &revived_conns, vector< IServer_ConnectionBase * > &to_close_conns, vector< IServer_ConnectionBase * > &to_delete_conns) |
void | StartListening (void) |
void | StopListening (void) |
vector< unsigned short > | GetListenerPorts (void) |
Provides a list of ports on which the server is listening. More... | |
Private Types | |
typedef set< TConnBase * > | TData |
Private Member Functions | |
void | x_UpdateExpiration (TConnBase *conn) |
Private Attributes | |
TData | m_Data |
CMutex | m_Mutex |
unsigned int | m_MaxConnections |
CTrigger | m_ControlTrigger |
vector< unsigned short > | m_ListenerPortsToStop |
bool | m_ListeningStarted |
Definition at line 49 of file connection_pool.hpp.