Exemplo n.º 1
0
        public static bool StopMooNet()
        {
            if (MooNetServer == null)
            {
                return(false);
            }

            Logger.Warn("Stopping MooNet-Server..");
            MooNetServer.Shutdown();
            MooNetServerThread.Abort();
            MooNetServer = null;
            return(true);
        }
Exemplo n.º 2
0
        public static bool StartMooNet()
        {
            if (MooNetServer != null)
            {
                return(false);
            }

            MooNetServer       = new MooNetServer();
            MooNetServerThread = new Thread(MooNetServer.Run)
            {
                IsBackground = true, CurrentCulture = CultureInfo.InvariantCulture
            };
            MooNetServerThread.Start();
            return(true);
        }