Begins to asynchronously receive data from a connected ProxySocket.

Namespace:  Rebex.Net
Assembly:  Rebex.Networking (in Rebex.Networking.dll)

Syntax

Visual Basic
Public Function BeginReceive ( _
	buffer As Byte(), _
	offset As Integer, _
	count As Integer, _
	socketFlags As SocketFlags, _
	callback As AsyncCallback, _
	state As Object _
) As IAsyncResult
C#
public IAsyncResult BeginReceive(
	byte[] buffer,
	int offset,
	int count,
	SocketFlags socketFlags,
	AsyncCallback callback,
	Object state
)

Parameters

buffer
Type: array<System..::..Byte>[]()[][]
The storage location for the received data.
offset
Type: System..::..Int32
The position in the buffer at which to store the received data.
count
Type: System..::..Int32
The number of bytes to receive.
socketFlags
Type: System.Net.Sockets..::..SocketFlags
A bitwise combination of the SocketFlags values.
callback
Type: System..::..AsyncCallback
The AsyncCallback delegate.
state
Type: System..::..Object
An object containing state information for this request.

Return Value

An IAsyncResult that references the asynchronous read.

Implements

ISocketExt..::..BeginReceive(array<Byte>[]()[][], Int32, Int32, SocketFlags, AsyncCallback, Object)

Remarks

Prior to receiving data, the socket must be connected using either a call to Connect(EndPoint) method or a call to Listen(ISocket) and Accept()()()() methods.

The BeginReceive method starts asynchronously reading data from a ProxySocket. You should create a callback method that implements the AsyncCallback delegate. This callback method should use the EndReceive method to complete the asynchronous operation. See the .NET Framework SDK Reference for more information on asynchronous methods.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also