Ejemplo n.º 1
0
        /**
         * Stops the currently running server
         */
        public void Stop()
        {
            if (_netServer.IsStarted)
            {
                // Before shutting down, send TCP packets to all clients indicating
                // that the server is shutting down
                _netServer.BroadcastTcp(new ServerShutdownPacket().CreatePacket());

                _netServer.Stop();
            }
            else
            {
                Logger.Warn(this, "Could not stop server, it was not started");
            }
        }