C# Class Sanguosha.Core.Network.Server

Afficher le fichier Open project: RagingBigFemaleBird/sgs Class Usage Examples

Méthodes publiques

Méthode 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

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

Method Details

IsDisconnected() public méthode

public IsDisconnected ( int id ) : bool
id int
Résultat bool

SendPacket() public méthode

public SendPacket ( int clientId, GameDataPacket packet ) : void
clientId int
packet GameDataPacket
Résultat void

Server() public méthode

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

SetOnlineStatus() public méthode

public SetOnlineStatus ( int id, OnlineStatus status ) : void
id int
status OnlineStatus
Résultat void

Start() public méthode

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

Stop() public méthode

public Stop ( ) : void
Résultat void