Share via


Socket.SendTo Method (Byte[], EndPoint)

Sends all of the data currently in the buffer array to a specified endpoint.

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

Syntax

public int SendTo (
         byte[] buffer,
         EndPointremoteEP
)

Parameters

  • buffer
    An array that contains the data to be sent.
  • remoteEP
    An EndPoint object that specifies the address of the destination socket.

Return Value

The number of bytes actually sent, 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