Mentalis.org Security Library documentation

SecureSocket.EndReceive Method 

Ends a pending asynchronous read.

[Visual Basic]
Overrides Public Function EndReceive( _
   ByVal asyncResult As IAsyncResult _
) As Integer
[C#]
public override int EndReceive(
   IAsyncResult asyncResult
);

Parameters

asyncResult
Stores state information for this asynchronous operation as well as any user defined data.

Return Value

The number of bytes received.

Exceptions

Exception TypeCondition
ArgumentNullExceptionasyncResult is a null reference (Nothing in Visual Basic).
ArgumentExceptionasyncResult was not returned by a call to the BeginReceive method.
InvalidOperationExceptionEndReceive was previously called for the asynchronous read.
SocketExceptionAn operating system error occurs while accessing the socket.
ObjectDisposedExceptionThe SecureSocket has been closed.
SecurityExceptionAn error occurred while decrypting data received from the remote host.

See Also

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