Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate C# (CSharp) Метод

Validate() публичный Метод

public Validate ( ) : void
Результат void
        public void Validate()
        {
            SocketError socketError = this.SocketError;
            if (socketError != SocketError.Success)
            {
                throw new SocketException((int) socketError);
            }
        }

Usage Example

Пример #1
0
            public void FinishWrite(SocketChannelAsyncOperation operation)
            {
                bool resetWritePending = this.Channel.ResetState(StateFlags.WriteScheduled);

                Contract.Assert(resetWritePending);
                var input = OutboundBuffer;

                try
                {
                    operation.Validate();
                    var sent = operation.BytesTransferred;
                    Channel.ResetWriteOperation();
                    if (sent > 0)
                    {
                        input.RemoveBytes(sent);
                    }
                }
                catch (Exception ex)
                {
                    input.FailFlushed(ex, true);
                    throw;
                }

                // directly call super.flush0() to force a flush now
                base.Flush0();
            }
All Usage Examples Of Helios.Channels.Sockets.SocketChannelAsyncOperation::Validate
SocketChannelAsyncOperation