Example #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();
            }
        }
Example #2
0
 public virtual void handle_accept(AsyncAccept ar)
 {
 }