Esempio n. 1
0
        private static void e_completed(object sender, SocketAsyncEventArgs e)
        {
            AsyncAccept ac = (AsyncAccept)e.UserToken;

            if (e.AcceptSocket != null)
            {
                Console.WriteLine("Async Connection Established");

                ac.handler().handle_accept(ac);
            }
            else
            {
                Console.WriteLine("Connection Failed");
                ((Socket)ac.handle()).Close();
            }
        }
Esempio n. 2
0
 public virtual void handle_accept(AsyncAccept ar)
 {
 }