Kanzi Connect  3.9.8
Kanzi Connect C++ API
kanzi::connect::ConnectionAdapter::Observer Class Referenceabstract

Observer class that is used for notifications such as new connections or data. More...

#include <connection_adapter_server.hpp>

Inheritance diagram for kanzi::connect::ConnectionAdapter::Observer:
kanzi::connect::NetworkListener

Public Member Functions

virtual bool clientExists (size_t clientId) const =0
 Check whether a client identifier is valid one. More...
 
virtual void onConnected (size_t clientId, ConnectionAdapter &adapter)
 Notification of a newly connected client. More...
 
virtual void onDisconnected (size_t clientId, ConnectionAdapter &adapter)
 Notification of a disconnected client. More...
 
virtual void onReceive (size_t clientId, const vector< char > &data)
 Notification of new data from a a client. More...
 

Detailed Description

Observer class that is used for notifications such as new connections or data.

Member Function Documentation

◆ clientExists()

virtual bool kanzi::connect::ConnectionAdapter::Observer::clientExists ( size_t  clientId) const
pure virtual

Check whether a client identifier is valid one.

Parameters
clientIdIdentifier of the client.
Returns
True if client exists.

◆ onConnected()

virtual void kanzi::connect::ConnectionAdapter::Observer::onConnected ( size_t  clientId,
ConnectionAdapter adapter 
)
inlinevirtual

Notification of a newly connected client.

Parameters
clientIdThe id of the connected client.

◆ onDisconnected()

virtual void kanzi::connect::ConnectionAdapter::Observer::onDisconnected ( size_t  clientId,
ConnectionAdapter adapter 
)
inlinevirtual

Notification of a disconnected client.

Parameters
clientIdThe id of the disconnected client.

◆ onReceive()

virtual void kanzi::connect::ConnectionAdapter::Observer::onReceive ( size_t  clientId,
const vector< char > &  data 
)
inlinevirtual

Notification of new data from a a client.

Parameters
clientIdThe id of the client that sent the data.
dataThe data that was received.

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