void Receive_End(IAsyncResult ar)
        {
            Receive_SO stateObj = (Receive_SO)ar.AsyncState;

            try
            {
                stateObj.UpdateContext();
                stateObj.Read = _socket.EndReceive(ar);
            }
            catch (Exception e)
            {
                stateObj.Exception = e;
            }
            stateObj.SetCompleted();
        }
Пример #2
0
        private void Receive_End(IAsyncResult ar)
        {
            Receive_SO asyncState = (Receive_SO)ar.AsyncState;

            try
            {
                asyncState.UpdateContext();
                asyncState.Read = base._socket.EndReceive(ar);
            }
            catch (Exception exception)
            {
                asyncState.Exception = exception;
            }
            asyncState.SetCompleted();
        }