Ejemplo n.º 1
0
 // Creates and starts a new server
 public Server(IGameStateEngine stateEngine)
 {
     GameStateEngine.Set(stateEngine);
     _tcp               = new TcpListener(IPAddress.Any, stateEngine.Game.HostUri.Port);
     _handler           = new Handler(stateEngine.Game.GameId, stateEngine.Game.GameVersion);
     _connectionChecker = new Thread(CheckConnections);
     _connectionChecker.Start();
     Start();
 }
Ejemplo n.º 2
0
 // Creates and starts a new server
 public Server(IGameStateEngine stateEngine)
 {
     GameStateEngine.Set(stateEngine);
     Log.InfoFormat("Creating server {0}", stateEngine.Game.HostUri);
     _tcp               = new TcpListener(IPAddress.Any, stateEngine.Game.HostUri.Port);
     _handler           = new Handler(stateEngine.Game.GameId, stateEngine.Game.GameVersion, stateEngine.Game.Password);
     _connectionChecker = new Thread(CheckConnections);
     _connectionChecker.Start();
     Start();
 }