Share via


Socket.ReceiveFrom Method (Byte[], EndPoint)

Receives all of the data currently available from an unbound socket, places the data in a buffer array, and gets the data's endpoint.

Namespace: System.Net.Sockets
Assembly: System (in system.dll)

Syntax

 public int ReceiveFrom (
         byte[] buffer,
         ref EndPoint remoteEP
)

Parameters

  • buffer
    An array in which the received data is placed.
  • remoteEP
    An EndPoint object that, when this method's 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

See Also

Reference

Socket Class
Socket Members
System.Net.Sockets Namespace