// 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(); }
// 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(); }