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
-
inline virtual void
onConnected
(int, NetworkListener*) Callback to notify that connection has been established.
- Parameters
clientId – The id of the connected client.
listener – Listener that triggered the notification.
-
inline virtual void
onDisconnected
(int, NetworkListener*) Callback to notify that connection has been terminated.
- Parameters
clientId – The id of the disconnected client.
listener – Listener that triggered the notification.
-
inline virtual void
onPacketReceived
(int, NetworkListener*) Callback to notify that there is incoming data.
- Parameters
clientId – The id of the client that sent data.
listener – Listener that triggered the notification.
-
inline virtual void