Start() public method

public Start ( ) : void
return void
Example #1
0
        public static void Main()
        {
            var serverApp = new LoginServerApp();

            // start the server
            serverApp.Start();

            // add shutdown hook to close & disconnect the server
            // gracefully if the application is killed
            AppDomain.CurrentDomain.ProcessExit += (s, e) =>
            {
                serverApp.Stop();
                Console.WriteLine("Server is terminating.");
            };
        }
Example #2
0
        public static void Main()
        {
            var serverApp = new LoginServerApp();

            // start the server
            serverApp.Start();

            // add shutdown hook to close & disconnect the server
            // gracefully if the application is killed
            AppDomain.CurrentDomain.ProcessExit += (s, e) =>
            {
                serverApp.Stop();
                Console.WriteLine("Server is terminating.");
            };
        }
Example #3
0
        public static void Main()
        {
            Console.Title = "GW2Emu login server";

            LoginServerApp serverApp = new LoginServerApp();

            // register the event handlers
            serverApp.RegisterHandlers();

            // start the server
            serverApp.Start();

            // add shutdown hook to close & disconnect the server
            // gracefully if the application is killed
            AppDomain.CurrentDomain.ProcessExit += delegate
            {
                serverApp.Stop();
                Console.WriteLine("Server is terminating.");
            };
        }