Mentalis.org Security Library documentation

SecureSocket.Receive Method (Byte[], Int32, SocketFlags)

Receives data from a connected SecureSocket into a specific location of the receive buffer.

[Visual Basic]
Overrides Overloads Public Function Receive( _
   ByVal buffer As Byte(), _
   ByVal size As Integer, _
   ByVal socketFlags As SocketFlags _
) As Integer
[C#]
public override int Receive(
   byte[] buffer,
   int size,
   SocketFlags socketFlags
);

Parameters

buffer
The storage location for the received data.
size
The number of bytes to receive.
socketFlags
A bitwise combination of the SecureSocket values.

Return Value

The number of bytes received.

Exceptions

Exception TypeCondition
ArgumentNullExceptionbuffer is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeExceptionThe size exceeds the size of buffer.
SocketExceptionAn operating system error occurs while accessing the SecureSocket.
ObjectDisposedExceptionThe SecureSocket has been closed.
SecurityExceptionAn error occurred while decrypting the received data.

See Also

SecureSocket Class | Org.Mentalis.Security.Ssl Namespace | SecureSocket.Receive Overload List