ConnectionAdapter::ObserverΒΆ
-
class
kanzi::connect::ConnectionAdapter::Observer Observer class that is used for notifications such as new connections or data.
Subclassed by NetworkListener
Public Functions
-
bool
clientExists(size_t clientId) const = 0 Check whether a client identifier is valid one.
- Return
True if client exists.
- Parameters
clientId: Identifier of the client.
-
void
onConnected(size_t clientId, ConnectionAdapter &adapter) Notification of a newly connected client.
- Parameters
clientId: The id of the connected client.
-
void
onDisconnected(size_t clientId, ConnectionAdapter &adapter) Notification of a disconnected client.
- Parameters
clientId: The id of the disconnected client.
-
void
onReceive(size_t clientId, const vector<char> &data) Notification of new data from a a client.
- Parameters
clientId: The id of the client that sent the data.data: The data that was received.
-
bool