class connection_manager - 5cript/attender GitHub Wiki
The connection manager holds all active connections.
| Members | Descriptions |
|---|---|
public ~connection_manager() |
|
public template<typename T,typename SocketT> inline http_connection_interface * create(http_server_interface * server,SocketT * socket,final_callback const & on_timeout)
|
Add a connection to the manager. |
public template<typename T,typename SocketT> inline http_connection_interface * create(http_server_interface * server,SocketT && socket,final_callback const & on_timeout)
|
Add a connection to the manager. |
public void clear() |
Remove and terminate all connections. |
public void remove(http_connection_interface * connection)
|
Remove and terminate the given connection. |
public std::size_t count() const |
public template<typename T,typename SocketT>
inline http_connection_interface * create(http_server_interface * server,SocketT * socket,final_callback const & on_timeout)
Add a connection to the manager.
-
serverThe owning server (which accepted the connection). -
socketThe socket that is associated with the connection.
Returns: The new connection object.
public template<typename T,typename SocketT>
inline http_connection_interface * create(http_server_interface * server,SocketT && socket,final_callback const & on_timeout)
Add a connection to the manager.
-
serverThe owning server (which accepted the connection). -
socketThe socket that is associated with the connection.
Returns: The new connection object.
Remove and terminate all connections.
public void remove(http_connection_interface * connection)
Remove and terminate the given connection.
-
connectionThe connection to remove.
Returns: Returns the amount of active connections.