Exemplo n.º 1
0
        //Called when the console window is closed with Ctrl+C
        protected static void Exit(object sender, ConsoleCancelEventArgs args)
        {
            //We'll handle this
            args.Cancel = true;

            server.shutdown();
        }
Exemplo n.º 2
0
        //Called when the console window is closed with Ctrl+C
        protected static void Exit(object sender, ConsoleCancelEventArgs args)
        {
            //We'll handle this
            args.Cancel = true;

            Log.write("{0} recieved.", args.SpecialKey);
            server.shutdown();
        }