//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(); }
//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(); }