C# 클래스 ServerNetworkConnections.TCPConnection

Class that encapsulates a socket into a more convenient unit from which you can write AbstractMessage to and read AbstractMessages from
파일 보기 프로젝트 열기: bakacaptain/istalkapp 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Closes the TCPConnection.

Read ( ) : AbstractMessage

Reads an AbstractMessage from the TCPConnection. Will throw an XmlException if an invalid Xml message was received.

TCPConnection ( String hostname, UInt16 port, AbstractMessageParser parser ) : System

Initializes the TCPConnection to the given hostname / port.

TCPConnection ( TcpClient client, AbstractMessageParser parser ) : System

Initializes the TCPConnection with the given TcpClient.

Write ( AbstractMessage msg ) : void

Writes the given AbstractMessage into the TCPConnection.

메소드 상세

Close() 공개 메소드

Closes the TCPConnection.
public Close ( ) : void
리턴 void

Read() 공개 메소드

Reads an AbstractMessage from the TCPConnection. Will throw an XmlException if an invalid Xml message was received.
public Read ( ) : AbstractMessage
리턴 AbstractMessage

TCPConnection() 공개 메소드

Initializes the TCPConnection to the given hostname / port.
public TCPConnection ( String hostname, UInt16 port, AbstractMessageParser parser ) : System
hostname String A String with the hostname of the server
port System.UInt16 A UInt16 with the port of the server.
parser AbstractMessageParser
리턴 System

TCPConnection() 공개 메소드

Initializes the TCPConnection with the given TcpClient.
public TCPConnection ( TcpClient client, AbstractMessageParser parser ) : System
client System.Net.Sockets.TcpClient The TcpClient to the server.
parser AbstractMessageParser
리턴 System

Write() 공개 메소드

Writes the given AbstractMessage into the TCPConnection.
public Write ( AbstractMessage msg ) : void
msg AbstractMessage
리턴 void