C# Class OpenNos.Core.Networking.Communication.Scs.Communication.Channels.CommunicationChannelBase

This class provides base functionality for all communication channel Classs.
Inheritance: ICommunicationChannel
Mostrar archivo Open project: OpenNos/OpenNos

Public Methods

Method Description
ClearLowPriorityQueue ( ) : System.Threading.Tasks.Task
Disconnect ( ) : void

Disconnects from remote application and closes this channel.

SendMessage ( IScsMessage message, byte priority ) : void

Sends a message to the remote application.

Start ( ) : void

Starts the communication with remote application.

Protected Methods

Method Description
CommunicationChannelBase ( ) : System

Constructor.

OnDisconnected ( ) : void

Raises Disconnected event.

OnMessageReceived ( IScsMessage message, System.DateTime receivedTimestamp ) : void

Raises MessageReceived event.

OnMessageSent ( IScsMessage message ) : void

Raises MessageSent event.

SendMessagepublic ( IScsMessage message, byte priority ) : void

Sends a message to the remote application. This method is overrided by derived Classs to really send to message.

Startpublic ( ) : void

Starts the communication with remote application really.

Method Details

ClearLowPriorityQueue() public abstract method

public abstract ClearLowPriorityQueue ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

CommunicationChannelBase() protected method

Constructor.
protected CommunicationChannelBase ( ) : System
return System

Disconnect() public abstract method

Disconnects from remote application and closes this channel.
public abstract Disconnect ( ) : void
return void

OnDisconnected() protected method

Raises Disconnected event.
protected OnDisconnected ( ) : void
return void

OnMessageReceived() protected method

Raises MessageReceived event.
protected OnMessageReceived ( IScsMessage message, System.DateTime receivedTimestamp ) : void
message IScsMessage Received message
receivedTimestamp System.DateTime
return void

OnMessageSent() protected method

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

SendMessage() public method

Sends a message to the remote application.
/// Throws ArgumentNullException if message is null ///
public SendMessage ( IScsMessage message, byte priority ) : void
message IScsMessage Message to be sent
priority byte
return void

SendMessagepublic() protected abstract method

Sends a message to the remote application. This method is overrided by derived Classs to really send to message.
protected abstract SendMessagepublic ( IScsMessage message, byte priority ) : void
message IScsMessage Message to be sent
priority byte
return void

Start() public method

Starts the communication with remote application.
public Start ( ) : void
return void

Startpublic() protected abstract method

Starts the communication with remote application really.
protected abstract Startpublic ( ) : void
return void