C# 클래스 OpenNos.Core.Networking.Communication.Scs.Communication.Channels.Tcp.TcpCommunicationChannel

This class is used to communicate with a remote application over TCP/IP protocol.
상속: CommunicationChannelBase
파일 보기 프로젝트 열기: OpenNos/OpenNos

공개 메소드들

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

보호된 메소드들

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

비공개 메소드들

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

메소드 상세

ClearLowPriorityQueue() 공개 메소드

public ClearLowPriorityQueue ( ) : Task
리턴 Task

Disconnect() 공개 메소드

Disconnects from remote application and closes channel.
public Disconnect ( ) : void
리턴 void

Dispose() 공개 메소드

Calls Disconnect method.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

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

SendInterval() 공개 메소드

public SendInterval ( ) : void
리턴 void

SendMessagepublic() 보호된 메소드

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

StartSending() 공개 정적인 메소드

public static StartSending ( System.Action action, System.TimeSpan period, CancellationToken _sendCancellationToken ) : Task
action System.Action
period System.TimeSpan
_sendCancellationToken System.Threading.CancellationToken
리턴 Task

Startpublic() 보호된 메소드

Starts the thread to receive messages from socket.
protected Startpublic ( ) : void
리턴 void

TcpCommunicationChannel() 공개 메소드

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 ///
리턴 OpenNos.Core.Networking.Communication.Scs.Communication.EndPoints