Esempio n. 1
0
 private void ButtonStop_Click(object sender, EventArgs e)
 {
     worldServer.Dispose();
     ButtonStop.Enabled  = false;
     ButtonStart.Enabled = true;
     Log("World server stopped.");
 }
Esempio n. 2
0
 // Clean up all active socket before closing the server
 static bool ConsoleEventCallback(int eventType)
 {
     if (eventType == 2)
     {
         WorldServer.Dispose();
     }
     return(false);
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            m_Handler = new ConsoleEventDelegate(ConsoleEventCallback);
            SetConsoleCtrlHandler(m_Handler, true);

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