C# Class GameMachine.Core.AsyncTcpClient

Inheritance: Client
Datei anzeigen Open project: gamemachine/gamemachine

Public Properties

Property Type Description
entityQueue ConcurrentQueue
running bool

Public Methods

Method Description
AsyncTcpClient ( string address, int port, string playerId, int authtoken ) : System
Connect ( ) : void
CreateClientMessage ( ) : io.gamemachine.messages.ClientMessage
Deserialize ( Stream inc ) : io.gamemachine.messages.ClientMessage
GetBytesIn ( ) : long
GetBytesOut ( ) : long
IsRunning ( ) : bool
ReceivedPlayerConnected ( ) : bool
Reconnect ( ) : void
ResetBytes ( ) : void
Send ( byte bytes ) : void
SendEntities ( List entities ) : void
SendEntity ( io.gamemachine.messages.Entity entity ) : void
SendPlayerConnect ( ) : void
SetConnectionType ( int connectionType ) : void
Start ( ) : void
Stop ( ) : void
Write ( byte bytes ) : void

Private Methods

Method Description
AsyncTcpClient ( int port ) : System
ConnectCallback ( IAsyncResult result ) : void
Connected ( ) : void
ReadCallback ( IAsyncResult result ) : void
Serialize ( io.gamemachine.messages.ClientMessage message ) : byte[]
WriteCallback ( IAsyncResult result ) : void

Method Details

AsyncTcpClient() public method

public AsyncTcpClient ( string address, int port, string playerId, int authtoken ) : System
address string
port int
playerId string
authtoken int
return System

Connect() public method

public Connect ( ) : void
return void

CreateClientMessage() public method

public CreateClientMessage ( ) : io.gamemachine.messages.ClientMessage
return io.gamemachine.messages.ClientMessage

Deserialize() public method

public Deserialize ( Stream inc ) : io.gamemachine.messages.ClientMessage
inc Stream
return io.gamemachine.messages.ClientMessage

GetBytesIn() public method

public GetBytesIn ( ) : long
return long

GetBytesOut() public method

public GetBytesOut ( ) : long
return long

IsRunning() public method

public IsRunning ( ) : bool
return bool

ReceivedPlayerConnected() public method

public ReceivedPlayerConnected ( ) : bool
return bool

Reconnect() public method

public Reconnect ( ) : void
return void

ResetBytes() public method

public ResetBytes ( ) : void
return void

Send() public method

public Send ( byte bytes ) : void
bytes byte
return void

SendEntities() public method

public SendEntities ( List entities ) : void
entities List
return void

SendEntity() public method

public SendEntity ( io.gamemachine.messages.Entity entity ) : void
entity io.gamemachine.messages.Entity
return void

SendPlayerConnect() public method

public SendPlayerConnect ( ) : void
return void

SetConnectionType() public method

public SetConnectionType ( int connectionType ) : void
connectionType int
return void

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

Write() public method

public Write ( byte bytes ) : void
bytes byte
return void

Property Details

entityQueue public_oe static_oe property

public static ConcurrentQueue entityQueue
return ConcurrentQueue

running public_oe property

public bool running
return bool