reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
reTurn::ConnectionManager Class Reference

Manages open connections so that they may be cleanly stopped when the server needs to shut down, and counts them per client IP address (with turnManager, which counts all the servers' connections, for MaxTcpConnectionsPerIp). More...

#include <ConnectionManager.hxx>

Public Member Functions

 ConnectionManager (TurnManager &turnManager)
 
 ConnectionManager (const ConnectionManager &)=delete
 
ConnectionManager & operator= (const ConnectionManager &)=delete
 
void start (ConnectionPtr c, const asio::ip::address &remoteAddress)
 Add the specified connection, from remoteAddress, to the manager and start it - or, if remoteAddress already has as many connections as allowed, close it.
 
void stop (ConnectionPtr c)
 Stop the specified connection.
 
void stopAll ()
 Stop all connections.
 

Detailed Description

Manages open connections so that they may be cleanly stopped when the server needs to shut down, and counts them per client IP address (with turnManager, which counts all the servers' connections, for MaxTcpConnectionsPerIp).

Definition at line 14 of file ConnectionManager.hxx.

Constructor & Destructor Documentation

◆ ConnectionManager() [1/2]

reTurn::ConnectionManager::ConnectionManager ( TurnManager &  turnManager)
inlineexplicit

Definition at line 18 of file ConnectionManager.hxx.

◆ ConnectionManager() [2/2]

reTurn::ConnectionManager::ConnectionManager ( const ConnectionManager &  )
delete

Member Function Documentation

◆ operator=()

ConnectionManager & reTurn::ConnectionManager::operator= ( const ConnectionManager &  )
delete

◆ start()

void reTurn::ConnectionManager::start ( ConnectionPtr  c,
const asio::ip::address &  remoteAddress 
)

Add the specified connection, from remoteAddress, to the manager and start it - or, if remoteAddress already has as many connections as allowed, close it.

Definition at line 10 of file ConnectionManager.cxx.

◆ stop()

void reTurn::ConnectionManager::stop ( ConnectionPtr  c)

Stop the specified connection.

Definition at line 22 of file ConnectionManager.cxx.

◆ stopAll()

void reTurn::ConnectionManager::stopAll ( )

Stop all connections.

Definition at line 34 of file ConnectionManager.cxx.


The documentation for this class was generated from the following files: