Receives data from an unbound socket, according to specified flags, and places the data in a buffer array, beginning at a specified location in the buffer. This method also gets the data's endpoint.

Namespace: GHIElectronics.NETMF.Net.Sockets
Assembly: GHIElectronics.NETMF.W5100 (in GHIElectronics.NETMF.W5100.dll) Version: 4.1.9.0 (4.1.9.0)

Syntax

C#
public int ReceiveFrom(
	byte[] buffer,
	int offset,
	int size,
	SocketFlags socketFlags,
	ref EndPoint remoteEP
)

Parameters

buffer
Type: array<System..::..Byte>[]()[][]
An array in which the received data is placed.
offset
Type: System..::..Int32
The location, relative to the beginning of the buffer array, where the storing of received data is to begin.
size
Type: System..::..Int32
The size of the buffer array, in bytes. If the number of bytes received is greater than the size of the buffer array, the data is truncated so that it fits in the array.
socketFlags
Type: GHIElectronics.NETMF.Net.Sockets..::..SocketFlags
Ignored
remoteEP
Type: GHIElectronics.NETMF.Net..::..EndPoint%
An EndPoint object that, when this method returns a value, specifies the address of the socket from from which the data was received.

Return Value

The number of bytes received, if the call was successful; otherwise, -1.

See Also