Skip to main content

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

MembersDescriptions
{property} List< ActiveClient>ActiveClientsStores a list of all currently connected clients.
{property} ILogger LoggerGets 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

  • clientName The name of the client whose context needs updating.

  • documentPage The current page number of the document.

  • documentPath The 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

  • clientAddress The address or identifier of the client.

  • msg The 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

  • msg The 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

  • sender The source of the event.

  • msg The 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

  • sender The source of the event.

  • msg The message received from the client, as a byte array.

public inline void RaiseClientDisconnectedEvent(object sender,string clientName)

Raises the OnClientDisconnected event.

Parameters

  • sender The source of the event.

  • clientName The name of the client that got disconnected.