C# 클래스 OpenNos.Core.Networking.Communication.Scs.Client.ScsClientBase

This class provides base functionality for client Classs.
상속: IScsClient
파일 보기 프로젝트 열기: OpenNos/OpenNos

공개 메소드들

메소드 설명
ClearLowPriorityQueue ( ) : System.Threading.Tasks.Task
Connect ( ) : void

Connects to server.

Disconnect ( ) : void

Disconnects from server. Does nothing if already disconnected.

Dispose ( ) : void

Disposes this object and closes underlying connection.

SendMessage ( IScsMessage message, byte priority ) : void

Sends a message to the server.

보호된 메소드들

메소드 설명
CreateCommunicationChannel ( ) : ICommunicationChannel

This method is implemented by derived Classs to create appropriate communication channel.

Dispose ( bool disposing ) : void
OnConnected ( ) : void

Raises Connected event.

OnDisconnected ( ) : void

Raises Disconnected event.

OnMessageReceived ( IScsMessage message ) : void

Raises MessageReceived event.

OnMessageSent ( IScsMessage message ) : void

Raises MessageSent event.

ScsClientBase ( ) : OpenNos.Core.Networking.Communication.Scs.Communication

Constructor.

비공개 메소드들

메소드 설명
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.

PingTimer_Elapsed ( object sender, EventArgs e ) : void

Handles Elapsed event of _pingTimer to send PingMessage messages to server.

메소드 상세

ClearLowPriorityQueue() 공개 메소드

public ClearLowPriorityQueue ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

Connect() 공개 메소드

Connects to server.
public Connect ( ) : void
리턴 void

CreateCommunicationChannel() 보호된 추상적인 메소드

This method is implemented by derived Classs to create appropriate communication channel.
protected abstract CreateCommunicationChannel ( ) : ICommunicationChannel
리턴 ICommunicationChannel

Disconnect() 공개 메소드

Disconnects from server. Does nothing if already disconnected.
public Disconnect ( ) : void
리턴 void

Dispose() 공개 메소드

Disposes this object and closes underlying connection.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

OnConnected() 보호된 메소드

Raises Connected event.
protected OnConnected ( ) : void
리턴 void

OnDisconnected() 보호된 메소드

Raises Disconnected event.
protected OnDisconnected ( ) : void
리턴 void

OnMessageReceived() 보호된 메소드

Raises MessageReceived event.
protected OnMessageReceived ( IScsMessage message ) : void
message IScsMessage Received message
리턴 void

OnMessageSent() 보호된 메소드

Raises MessageSent event.
protected OnMessageSent ( IScsMessage message ) : void
message IScsMessage Received message
리턴 void

ScsClientBase() 보호된 메소드

Constructor.
protected ScsClientBase ( ) : OpenNos.Core.Networking.Communication.Scs.Communication
리턴 OpenNos.Core.Networking.Communication.Scs.Communication

SendMessage() 공개 메소드

Sends a message to the server.
/// Throws a CommunicationStateException if client is not connected to the server. ///
public SendMessage ( IScsMessage message, byte priority ) : void
message IScsMessage Message to be sent
priority byte
리턴 void