Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::netio::IConnAcceptor Class Referenceabstract

Connection acceptor interface. More...

#include <iconn_acceptor.h>

Public Member Functions

virtual IConnHandleradd_connection (IConn &)=0
 Called for every new incoming connection. More...
 
virtual void remove_connection (IConnHandler &)=0
 Called after connection termination. More...
 

Detailed Description

Connection acceptor interface.

Remarks
  • Methods are called from the network loop thread.
  • Methods should not block.

Definition at line 25 of file iconn_acceptor.h.

Member Function Documentation

◆ add_connection()

virtual IConnHandler* roc::netio::IConnAcceptor::add_connection ( IConn )
pure virtual

Called for every new incoming connection.

Returns
IConnHandler object that will be notified when the connection state changes and when it becomes readable and writeable.
Remarks
It is the caller responsibility to ensure that the handler is not destroyed until remove_connection() call.

◆ remove_connection()

virtual void roc::netio::IConnAcceptor::remove_connection ( IConnHandler )
pure virtual

Called after connection termination.

Remarks
At this point, connection is already terminated and can't be used. It's safe to destroy connection handler here.

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