예제 #1
0
        static void Main(string[] args)
        {
            Console.Title = "NCAuthServer";
            Console.WriteLine(@"    ____  _   _______ ______               ");
            Console.WriteLine(@"   / __ )/ | / / ___// ____/___ ___  __  __");
            Console.WriteLine(@"  / __  /  |/ /\__ \/ __/ / __ `__ \/ / / /");
            Console.WriteLine(@" / /_/ / /|  /___/ / /___/ / / / / / /_/ / ");
            Console.WriteLine(@"/_____/_/ |_//____/_____/_/ /_/ /_/\__,_/  ");
            Console.WriteLine();

            Stopwatch sw = Stopwatch.StartNew();

            Configuration.GetInstance();

            StsServer stsServer = new StsServer(Configuration.Network.PublicPort);

            stsServer.Start();
            Log.Info("StsServer started.");

            sw.Stop();
            Thread.Sleep(100);
            Console.WriteLine("-------------------------------------------");
            Console.WriteLine("           Server start in {0}", (sw.ElapsedMilliseconds / 1000.0).ToString("0.00s"));
            Console.WriteLine("-------------------------------------------");

            /*while (true)
             *  Console.ReadLine();*/

            Process.GetCurrentProcess().WaitForExit();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.Title = "NCAuthServer";
            Console.WriteLine(@"    ____  _   _______ ______               ");
            Console.WriteLine(@"   / __ )/ | / / ___// ____/___ ___  __  __");
            Console.WriteLine(@"  / __  /  |/ /\__ \/ __/ / __ `__ \/ / / /");
            Console.WriteLine(@" / /_/ / /|  /___/ / /___/ / / / / / /_/ / ");
            Console.WriteLine(@"/_____/_/ |_//____/_____/_/ /_/ /_/\__,_/  ");
            Console.WriteLine();

            Stopwatch sw = Stopwatch.StartNew();
            Configuration.GetInstance();

            StsServer stsServer = new StsServer(Configuration.Network.PublicPort);
            stsServer.Start();
            Log.Info("StsServer started.");

            sw.Stop();
            Thread.Sleep(100);
            Console.WriteLine("-------------------------------------------");
            Console.WriteLine("           Server start in {0}", (sw.ElapsedMilliseconds / 1000.0).ToString("0.00s"));
            Console.WriteLine("-------------------------------------------");

            /*while (true)
                Console.ReadLine();*/

            Process.GetCurrentProcess().WaitForExit();
        }
예제 #3
0
        public static void HandleProcessStateInfo(ProcessStateInfo processStateInfo, PipeClientBase client)
        {
            switch (processStateInfo.State)
            {
            case PipeProcessState.Stop:
                StsServer.Shutdown();
                break;

            default:
                Log.Message(LogTypes.Warning, $"Received unhandled process state '{processStateInfo.State}' from '{processStateInfo.Alias}'.");
                break;
            }
        }