NetworkListener::ObserverΒΆ
-
class
kanzi::connect::NetworkListener::Observer Allows to receive notifications from network listener.
- Note
These callback methods are executed in the listening network thread.
Subclassed by ConnectionManager, P2PServer
Public Functions
-
~Observer() = default
-
void
onConnected(int clientId, NetworkListener *listener) Callback to notify that connection has been established.
- Parameters
clientId: The id of the connected client.listener: Listener that triggered the notification.
-
void
onDisconnected(int clientId, NetworkListener *listener) Callback to notify that connection has been terminated.
- Parameters
clientId: The id of the disconnected client.listener: Listener that triggered the notification.
-
void
onPacketReceived(int clientId, NetworkListener *listener) Callback to notify that there is incoming data.
- Parameters
clientId: The id of the client that sent data.listener: Listener that triggered the notification.