public override void OnDisconnect()
        {
            if (Program.ServerSession != null)
            {
                Program.ServerSession.DisconnectClient = false;
                Program.ServerSession.Disconnect();
                Program.ServerSession = null;
            }

            Instance = null;
            Listen();
        }
 static void EndAccept(IAsyncResult pIAR)
 {
     Console.WriteLine("Client Connected");
     Socket sock = listener.EndAcceptSocket(pIAR);
     Instance = new ClientSession(sock);
     listener.Stop();
     listener = null;
 }