public Socket Accept() { Socket s = m_Socket.Accept(); AcceptEventArgs e = new AcceptEventArgs(); e.m_Socket = s; e.m_ar = null; accept(this, e); return(s); }
private void OnSendEvents(IAsyncResult ar) { if (ar.IsCompleted) { Socket s = m_Socket.EndAccept(ar); AcceptEventArgs e = new AcceptEventArgs(); e.m_ar = ar; m_ar = ar; e.m_Socket = s; accept(this, e); m_Socket.BeginAccept(new AsyncCallback(OnSendEvents), null); } }
protected void OnAccept(object Sender, AcceptEventArgs e) { }