Пример #1
0
        public static bool StartServer()
        {
            if (GServ != null) return false;

            GServ = new GameServ();
            GameServerThread = new Thread(GServ.Run) { IsBackground = true, CurrentCulture = CultureInfo.InvariantCulture };
            GameServerThread.Start();

            return true;
        }
Пример #2
0
        public static bool StopServer()
        {
            if (GServ == null) return false;

            SysCons.WriteLine("Stopping GameServer..");
            GServ.Shutdown();
            GameServerThread.Abort();
            GServ = null;

            return true;
        }