C# Class Sanguosha.Core.Network.Server

显示文件 Open project: RagingBigFemaleBird/sgs Class Usage Examples

Public Methods

Method Description
IsDisconnected ( int id ) : bool
SendPacket ( int clientId, GameDataPacket packet ) : void
Server ( Game game, int capacity, IPAddress address ) : System

Initialize and start the server.

SetOnlineStatus ( int id, OnlineStatus status ) : void
Start ( ) : void

Ready the server. Block if require more clients to connect.

Stop ( ) : void

Private Methods

Method Description
ConnectionListener ( ) : void
Server_OnDisconnected ( ServerGamer gamer ) : void
_ConnectClient ( TcpClient client ) : void
_ReadLoginToken ( NetworkStream stream, int waitTimeMSecs ) : LoginToken?

Method Details

IsDisconnected() public method

public IsDisconnected ( int id ) : bool
id int
return bool

SendPacket() public method

public SendPacket ( int clientId, GameDataPacket packet ) : void
clientId int
packet GameDataPacket
return void

Server() public method

Initialize and start the server.
public Server ( Game game, int capacity, IPAddress address ) : System
game Game
capacity int
address IPAddress
return System

SetOnlineStatus() public method

public SetOnlineStatus ( int id, OnlineStatus status ) : void
id int
status OnlineStatus
return void

Start() public method

Ready the server. Block if require more clients to connect.
public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void