C# Класс OpenNos.Core.Networking.Communication.Scs.Server.ScsServerClient

This class represents a client in server side.
Наследование: IScsServerClient
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
OnMessageSent ( IScsMessage message ) : void

Raises MessageSent event.

Приватные методы

Метод Описание
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.

Описание методов

ClearLowPriorityQueue() публичный Метод

public ClearLowPriorityQueue ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

Disconnect() публичный Метод

Disconnects from client and closes underlying communication channel.
public Disconnect ( ) : void
Результат void

OnMessageSent() защищенный Метод

Raises MessageSent event.
protected OnMessageSent ( IScsMessage message ) : void
message IScsMessage Received message
Результат void

ScsServerClient() публичный Метод

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 ///
Результат OpenNos.Core.Networking.Communication.Scs.Communication

SendMessage() публичный Метод

Sends a message to the client.
public SendMessage ( IScsMessage message, byte priority ) : void
message IScsMessage Message to be sent
priority byte
Результат void