C# 클래스 Ballz.Network.Connection

Provides an abstraction of the protocol layer. Use it to establish a network connection with another game instance.
파일 보기 프로젝트 열기: SpagAachen/Ballz 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ClientPlayerId int
Id int

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Connection ( TcpClient connection, int id ) : System

Initializes a new instance of the Connection class and uses the already established connection.

Connection ( string host, int port, int id ) : System

Initializes a new instance of the Connection class and connects to the specified port on the specified host.

ReadUpdates ( ) : void
Send ( object obj ) : bool

Serializes on object and send it to another game instance.

메소드 상세

Connection() 공개 메소드

Initializes a new instance of the Connection class and uses the already established connection.
public Connection ( TcpClient connection, int id ) : System
connection System.Net.Sockets.TcpClient An already established connection.
id int Id for this connection
리턴 System

Connection() 공개 메소드

Initializes a new instance of the Connection class and connects to the specified port on the specified host.
public Connection ( string host, int port, int id ) : System
host string The DNS name of the remote host to which you intend to connect.
port int The port number of the remote host to which you intend to connect.
id int Id for this connection
리턴 System

ReadUpdates() 공개 메소드

public ReadUpdates ( ) : void
리턴 void

Send() 공개 메소드

Serializes on object and send it to another game instance.
public Send ( object obj ) : bool
obj object The object to send
리턴 bool

프로퍼티 상세

ClientPlayerId 공개적으로 프로퍼티

public int ClientPlayerId
리턴 int

Id 공개적으로 프로퍼티

public int Id
리턴 int