Exemplo n.º 1
0
 private void OnRecComplete(byte[] recBytes)
 {
     if (this.ReceiveCompleted != null)
     {
         SocketEventArgs sea = new SocketEventArgs();
         sea.RecBytes = recBytes;
         this.ReceiveCompleted.Invoke(this, sea);
     }
 }
Exemplo n.º 2
0
        private void OnRecCompleted(SocketAsyncState state, byte [] recBytes)
        {
            SocketEventArgs sockArgs = new SocketEventArgs();

            sockArgs.RecBytes  = recBytes;
            sockArgs.SockState = state;
            if (this.ReceiveCompleted != null)
            {
                this.ReceiveCompleted.Invoke(this, sockArgs);
            }
        }
Exemplo n.º 3
0
 private void ReciveEventHandler(object sender, SocketEventArgs e)
 {
     this.recBuffer.AddRange(e.RecBytes);
     this.recvAutoEvent.Set();
 }