Mentalis.org Security Library documentation

SecureNetworkStream.BeginRead Method 

Begins an asynchronous read from a stream.

[Visual Basic]
Overrides Public Function BeginRead( _
   ByVal buffer As Byte(), _
   ByVal offset As Integer, _
   ByVal size As Integer, _
   ByVal callback As AsyncCallback, _
   ByVal state As Object _
) As IAsyncResult
[C#]
public override IAsyncResult BeginRead(
   byte[] buffer,
   int offset,
   int size,
   AsyncCallback callback,
   object state
);

Parameters

buffer
The location in memory that stores the data from the stream.
offset
The location in buffer to begin storing the data to.
size
The maximum number of bytes to read.
callback
The delegate to call when the asynchronous call is complete.
state
An object containing additional information supplied by the client.

Return Value

An IAsyncResult representing the asynchronous call.

Exceptions

Exception TypeCondition
ArgumentNullExceptionbuffer is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeExceptionThe specified offset or size exceeds the size of buffer.
IOExceptionThere is a failure while reading from the network.

See Also

SecureNetworkStream Class | SecureNetworkStream Members | Org.Mentalis.Security.Ssl Namespace