NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CServer_ConnectionPool Class Reference

Search Toolkit Book for CServer_ConnectionPool

#include "connection_pool.hpp"
(Private to src/connect.)

+ Collaboration diagram for CServer_ConnectionPool:

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

Detailed Description

Definition at line 49 of file connection_pool.hpp.

The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:09:29 2024 by rev. 669887