Ejemplo n.º 1
0
 // Clean up all active socket before closing the server
 static bool ConsoleEventCallback(int eventType)
 {
     if (eventType == 2)
     {
         ClusterServer.Dispose();
     }
     return(false);
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            m_Handler = new ConsoleEventDelegate(ConsoleEventCallback);
            SetConsoleCtrlHandler(m_Handler, true);

            ClusterServer = new ClusterServer();
            Console.ReadLine();
            ClusterServer.Dispose();
        }