class connection_manager - 5cript/attender GitHub Wiki

class connection_manager

The connection manager holds all active connections.

Summary

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

Members


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.

Parameters

  • server The owning server (which accepted the connection).

  • socket The 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.

Parameters

  • server The owning server (which accepted the connection).

  • socket The socket that is associated with the connection.

Returns: The new connection object.


public void clear()

Remove and terminate all connections.


public void remove(http_connection_interface * connection)

Remove and terminate the given connection.

Parameters

  • connection The connection to remove.

public std::size_t count() const

Returns: Returns the amount of active connections.

⚠️ **GitHub.com Fallback** ⚠️