Kanzi Connect 3.9.10
kanzi::connect::NetworkListener::Observer Class Reference

Allows to receive notifications from network listener. More...

#include <network_listener.hpp>

Inheritance diagram for kanzi::connect::NetworkListener::Observer:
kanzi::connect::ConnectionManager kanzi::connect::p2p::P2PServer

Public Member Functions

virtual void onConnected (int clientId, NetworkListener *listener)
 Callback to notify that connection has been established.
 
virtual void onDisconnected (int clientId, NetworkListener *listener)
 Callback to notify that connection has been terminated.
 
virtual void onPacketReceived (int clientId, NetworkListener *listener)
 Callback to notify that there is incoming data.
 
virtual ~Observer ()=default
 

Detailed Description

Allows to receive notifications from network listener.

Note
These callback methods are executed in the listening network thread.

Constructor & Destructor Documentation

◆ ~Observer()

virtual kanzi::connect::NetworkListener::Observer::~Observer ( )
virtualdefault

Member Function Documentation

◆ onConnected()

virtual void kanzi::connect::NetworkListener::Observer::onConnected ( int clientId,
NetworkListener * listener )
inlinevirtual

Callback to notify that connection has been established.

Parameters
clientIdThe id of the connected client.
listenerListener that triggered the notification.

Reimplemented in kanzi::connect::p2p::P2PServer.

◆ onDisconnected()

virtual void kanzi::connect::NetworkListener::Observer::onDisconnected ( int clientId,
NetworkListener * listener )
inlinevirtual

Callback to notify that connection has been terminated.

Parameters
clientIdThe id of the disconnected client.
listenerListener that triggered the notification.

Reimplemented in kanzi::connect::p2p::P2PServer.

◆ onPacketReceived()

virtual void kanzi::connect::NetworkListener::Observer::onPacketReceived ( int clientId,
NetworkListener * listener )
inlinevirtual

Callback to notify that there is incoming data.

Parameters
clientIdThe id of the client that sent data.
listenerListener that triggered the notification.

Reimplemented in kanzi::connect::p2p::P2PServer.


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