System.Net.Security.SslState.StartSendAuthResetSignal C# (CSharp) Method

StartSendAuthResetSignal() private method

private StartSendAuthResetSignal ( ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception ) : void
message ProtocolToken
asyncRequest AsyncProtocolRequest
exception ExceptionDispatchInfo
return void
        private void StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
        {
            if (message == null || message.Size == 0)
            {
                //
                // We don't have an alert to send so cannot retry and fail prematurely.
                //
                exception.Throw();
            }

            if (asyncRequest == null)
            {
                InnerStream.Write(message.Payload, 0, message.Size);
            }
            else
            {
                asyncRequest.AsyncState = exception;
                IAsyncResult ar = InnerStream.BeginWrite(message.Payload, 0, message.Size, s_writeCallback, asyncRequest);
                if (!ar.CompletedSynchronously)
                {
                    return;
                }
                InnerStream.EndWrite(ar);
            }

            exception.Throw();
        }