Mentalis.org Security Library documentation

VirtualSocket.BeginReceiveFrom Method 

Begins to asynchronously receive data from a specified network device.

[Visual Basic]
Overridable Public Function BeginReceiveFrom( _
   ByVal buffer As Byte(), _
   ByVal offset As Integer, _
   ByVal size As Integer, _
   ByVal socketFlags As SocketFlags, _
   ByRef remoteEP As EndPoint, _
   ByVal callback As AsyncCallback, _
   ByVal state As Object _
) As IAsyncResult
[C#]
public virtual IAsyncResult BeginReceiveFrom(
   byte[] buffer,
   int offset,
   int size,
   SocketFlags socketFlags,
   ref EndPoint remoteEP,
   AsyncCallback callback,
   object state
);

Parameters

buffer
The storage location for the received data.
offset
The zero-based position in the buffer parameter at which to store the data.
size
The number of bytes to receive.
socketFlags
A bitwise combination of the SocketFlags values.
remoteEP
An EndPoint that represents the source of the data.
callback
The AsyncCallback delegate.
state
An object containing state information for this request.

Return Value

An IAsyncResult that references the asynchronous read.

Exceptions

Exception TypeCondition
ArgumentExceptionbuffer is a null reference (Nothing in Visual Basic).
-or-
remoteEP is a null reference (Nothing in Visual Basic).
-or-
offset is outside the bounds of buffer.
SocketExceptionAn operating system error occurs while accessing the VirtualSocket.
ArgumentOutOfRangeExceptionThe specified offset or size exceeds the size of buffer.
ObjectDisposedExceptionThe VirtualSocket has been closed.

See Also

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