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

ResumeAsyncReadCallback() private static method

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

                ((SslStreamInternal)request.AsyncObject)._sslState.FinishRead(null);
                request.CompleteUserWithError(e);
            }
        }