Пример #1
0
        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);
        }
Пример #2
0
 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);
     }
 }
Пример #3
0
 protected void OnAccept(object Sender, AcceptEventArgs e)
 {
 }