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