System.Net.Security.SslStreamInternal.ResumeAsyncWriteCallback C# (CSharp) Method

ResumeAsyncWriteCallback() private static method

private static ResumeAsyncWriteCallback ( AsyncProtocolRequest asyncRequest ) : void
asyncRequest AsyncProtocolRequest
return void
        private static void ResumeAsyncWriteCallback(AsyncProtocolRequest asyncRequest)
        {
            try
            {
                ((SslStreamInternal)asyncRequest.AsyncObject).StartWriting(asyncRequest.Buffer, asyncRequest.Offset, asyncRequest.Count, asyncRequest);
            }
            catch (Exception e)
            {
                if (asyncRequest.IsUserCompleted)
                {
                    // This will throw on a worker thread.
                    throw;
                }

                ((SslStreamInternal)asyncRequest.AsyncObject)._sslState.FinishWrite();
                asyncRequest.CompleteUserWithError(e);
            }
        }