System.Net.Security.SslStream.EndRead Method

Ends an asynchronous read operation started with a previous call to SslStream.BeginRead(Byte[], int, int, AsyncCallback, object).

Syntax

public override int EndRead (IAsyncResult asyncResult)

Parameters

asyncResult
An IAsyncResult instance returned by a call to SslStream.BeginRead(Byte[], int, int, AsyncCallback, object)

Returns

A int value that specifies the number of bytes read from the underlying stream.

Remarks

If the operation has not completed, this method blocks until it does.

To perform this operation synchronously, use the SslStream.Read(Byte[], int, int) method.

You cannot call this method until you have successfully authenticated. To authenticate call one of the erload:System.Net.Security.SslStream.AuthenticateAsClient, or erload:System.Net.Security.SslStream.BeginAuthenticateAsClient, erload:System.Net.Security.SslStream.AuthenticateAsServer, erload:System.Net.Security.SslStream.BeginAuthenticateAsServer methods.

Requirements

Namespace: System.Net.Security
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0