C# Class OpenNos.Core.Networking.Communication.Scs.Communication.Channels.Tcp.TcpCommunicationChannel

This class is used to communicate with a remote application over TCP/IP protocol.
Inheritance: CommunicationChannelBase
Afficher le fichier Open project: OpenNos/OpenNos

Méthodes publiques

Méthode Description
ClearLowPriorityQueue ( ) : Task
Disconnect ( ) : void

Disconnects from remote application and closes channel.

Dispose ( ) : void

Calls Disconnect method.

SendInterval ( ) : void
StartSending ( System.Action action, System.TimeSpan period, CancellationToken _sendCancellationToken ) : Task
TcpCommunicationChannel ( Socket clientSocket ) : OpenNos.Core.Networking.Communication.Scs.Communication.EndPoints

Creates a new TcpCommunicationChannel object.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void
SendMessagepublic ( IScsMessage message, byte priority ) : void

Sends a message to the remote application.

Startpublic ( ) : void

Starts the thread to receive messages from socket.

Private Methods

Méthode Description
ReceiveCallback ( IAsyncResult ar ) : void

This method is used as callback method in _clientSocket's BeginReceive method. It reveives bytes from socker.

SendByPriority ( ConcurrentQueue buffer ) : void
SendCallback ( IAsyncResult ar ) : void

Method Details

ClearLowPriorityQueue() public méthode

public ClearLowPriorityQueue ( ) : Task
Résultat Task

Disconnect() public méthode

Disconnects from remote application and closes channel.
public Disconnect ( ) : void
Résultat void

Dispose() public méthode

Calls Disconnect method.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

SendInterval() public méthode

public SendInterval ( ) : void
Résultat void

SendMessagepublic() protected méthode

Sends a message to the remote application.
protected SendMessagepublic ( IScsMessage message, byte priority ) : void
message IScsMessage Message to be sent
priority byte
Résultat void

StartSending() public static méthode

public static StartSending ( System.Action action, System.TimeSpan period, CancellationToken _sendCancellationToken ) : Task
action System.Action
period System.TimeSpan
_sendCancellationToken System.Threading.CancellationToken
Résultat Task

Startpublic() protected méthode

Starts the thread to receive messages from socket.
protected Startpublic ( ) : void
Résultat void

TcpCommunicationChannel() public méthode

Creates a new TcpCommunicationChannel object.
public TcpCommunicationChannel ( Socket clientSocket ) : OpenNos.Core.Networking.Communication.Scs.Communication.EndPoints
clientSocket Socket /// A connected Socket object that is used to communicate over network ///
Résultat OpenNos.Core.Networking.Communication.Scs.Communication.EndPoints