private static void StartServer() { Server = new Server.Server(Port,GameGuid,GameVersion); Server.OnStop += new EventHandler(Server_OnStop); Console.WriteLine("Starting server on port " + Port); while (KeepRunning) { Thread.Sleep(1000); } }
static void Server_OnStop(object sender, EventArgs e) { Server = null; KeepRunning = false; }