C# Class OpenNos.Core.Networking.Communication.Scs.Server.ScsServerClient

This class represents a client in server side.
Inheritance: IScsServerClient
Afficher le fichier Open project: OpenNos/OpenNos

Méthodes publiques

Méthode Description
ClearLowPriorityQueue ( ) : System.Threading.Tasks.Task
Disconnect ( ) : void

Disconnects from client and closes underlying communication channel.

ScsServerClient ( ICommunicationChannel communicationChannel ) : OpenNos.Core.Networking.Communication.Scs.Communication

Creates a new ScsClient object.

SendMessage ( IScsMessage message, byte priority ) : void

Sends a message to the client.

Méthodes protégées

Méthode Description
OnMessageSent ( IScsMessage message ) : void

Raises MessageSent event.

Private Methods

Méthode Description
CommunicationChannel_Disconnected ( object sender, EventArgs e ) : void

Handles Disconnected event of _communicationChannel object.

CommunicationChannel_MessageReceived ( object sender, MessageEventArgs e ) : void

Handles MessageReceived event of _communicationChannel object.

CommunicationChannel_MessageSent ( object sender, MessageEventArgs e ) : void

Handles MessageSent event of _communicationChannel object.

OnDisconnected ( ) : void

Raises Disconnected event.

OnMessageReceived ( IScsMessage message ) : void

Raises MessageReceived event.

Method Details

ClearLowPriorityQueue() public méthode

public ClearLowPriorityQueue ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

Disconnect() public méthode

Disconnects from client and closes underlying communication channel.
public Disconnect ( ) : void
Résultat void

OnMessageSent() protected méthode

Raises MessageSent event.
protected OnMessageSent ( IScsMessage message ) : void
message IScsMessage Received message
Résultat void

ScsServerClient() public méthode

Creates a new ScsClient object.
public ScsServerClient ( ICommunicationChannel communicationChannel ) : OpenNos.Core.Networking.Communication.Scs.Communication
communicationChannel ICommunicationChannel /// The communication channel that is used by client to send and receive messages ///
Résultat OpenNos.Core.Networking.Communication.Scs.Communication

SendMessage() public méthode

Sends a message to the client.
public SendMessage ( IScsMessage message, byte priority ) : void
message IScsMessage Message to be sent
priority byte
Résultat void