Socket.ReceiveFrom Method (Byte[], SocketFlags, EndPoint)
Receives all of the data currently available from an unbound socket, according to specified flags, and places the data in a buffer array. This method also gets the data's endpoint.
Namespace: System.Net.Sockets
Assembly: System (in system.dll)
Syntax
public int ReceiveFrom (
byte[] buffer,
SocketFlagssocketFlags,
ref EndPointremoteEP
)
Parameters
- buffer
An array in which the received data is placed. - socketFlags
Bit flags that control the socket's behavior for sending and receiving data. The value of this parameter is a bitwise combination of members of the SocketFlags enumeration. - remoteEP
An EndPoint object that, when this method returns a value, specifies the address of the socket from which the data was received.
Return Value
The number of bytes received, if the call was successful; otherwise, -1.
Version Information
Available in .NET Micro Framework version 2.0, 2.5