Socket.SendTo Method (Byte[], Int32, Int32, SocketFlags, EndPoint)
Sends data to a specified endpoint according to specified flags, beginning at a specified location in the buffer array.
Namespace: System.Net.Sockets
Assembly: System (in system.dll)
Syntax
public int SendTo (
byte[] buffer,
intoffset,
intsize,
SocketFlagssocketFlags,
EndPointremoteEP
)
Parameters
- buffer
An array that contains the data to be sent. - offset
The location, relative to the beginning of the buffer array, at which the reading of data to be sent is to begin. - size
The size of the data to be sent, in bytes. - 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 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