class Wacom::Kiosk::Integrator::Server
class Wacom::Kiosk::Integrator::Server
: public IDisposable
Serves as a base class for servers that manage connections, disconnections, and messages from clients. While this class can be instantiated, it is designed to be extended by derived classes that implement specific server behaviors.
Summary
| Members | Descriptions |
|---|---|
{property} List< ActiveClient>ActiveClients | Stores a list of all currently connected clients. |
{property} ILogger Logger | Gets or sets the logger used by the server for logging activities. |
public inline virtual void UpdateClientContext(string clientName,int documentPage,string documentPath) | Updates the context for a specific client, such as changing the document or page the client is viewing. Intended to be overridden in derived classes. |
public inline virtual void SendMessage(string clientAddress,byte[] msg) | Sends a message to a specified client. Intended to be overridden in derived classes. |
public inline virtual void BroadcastMessage(byte[] msg) | Broadcasts a message to all connected clients. Intended to be overridden in derived classes. |
public inline virtual void Dispose() | Releases resources used by the server. Intended to be overridden in derived classes. |
public inline void RaiseClientConnectedEvent(object sender,byte[] msg) | Raises the OnClientConnected event. |
public inline void RaiseSubscriberMessageRecieveEvent(object sender,byte[] msg) | Raises the OnSubscriberMessageReceived event. |
public inline void RaiseClientDisconnectedEvent(object sender,string clientName) | Raises the OnClientDisconnected event. |
Members
{property} List< ActiveClient>ActiveClients
Stores a list of all currently connected clients.
A list containing ActiveClient instances, each representing a connected client.
{property} ILogger Logger
Gets or sets the logger used by the server for logging activities.
This property can be overridden by derived classes to implement custom logging logic.
public inline virtual void UpdateClientContext(string clientName,int documentPage,string documentPath)
Updates the context for a specific client, such as changing the document or page the client is viewing. Intended to be overridden in derived classes.
Parameters
-
clientNameThe name of the client whose context needs updating. -
documentPageThe current page number of the document. -
documentPathThe path to the document.
This method serves as a placeholder for implementation in derived classes and does not perform any actions by itself.
public inline virtual void SendMessage(string clientAddress,byte[] msg)
Sends a message to a specified client. Intended to be overridden in derived classes.
Parameters
-
clientAddressThe address or identifier of the client. -
msgThe message to be sent, represented as a byte array.
This method serves as a placeholder for implementation in derived classes and does not perform any actions by itself.
public inline virtual void BroadcastMessage(byte[] msg)
Broadcasts a message to all connected clients. Intended to be overridden in derived classes.
Parameters
msgThe message to be broadcasted, represented as a byte array.
This method serves as a placeholder for implementation in derived classes and does not perform any actions by itself.
public inline virtual void Dispose()
Releases resources used by the server. Intended to be overridden in derived classes.
This method serves as a placeholder for implementation in derived classes and does not perform any actions by itself. Derived classes should implement their own disposal logic.
public inline void RaiseClientConnectedEvent(object sender,byte[] msg)
Raises the OnClientConnected event.
Parameters
-
senderThe source of the event. -
msgThe initial message or state from the connected client, as a byte array.
public inline void RaiseSubscriberMessageRecieveEvent(object sender,byte[] msg)
Raises the OnSubscriberMessageReceived event.
Parameters
-
senderThe source of the event. -
msgThe message received from the client, as a byte array.
public inline void RaiseClientDisconnectedEvent(object sender,string clientName)
Raises the OnClientDisconnected event.
Parameters
-
senderThe source of the event. -
clientNameThe name of the client that got disconnected.