[Overview][Constants][Types][Procedures and functions][Variables] Reference for unit 'Sockets' (#rtl)

SendTo

Send data through an unconnected socket to an address.

Declaration

Source position: socketsh.inc line 178

function SendTo(

  Sock: LongInt;

  const Buf;

  BufLen: LongInt;

  Flags: LongInt;

  var Addr;

  AddrLen: LongInt

):LongInt;

Description

SendTo sends data from buffer Buf with length Buflen through socket Sock with options Flags. The data is sent to address Addr, which has length AddrLen

Errors

On error, -1 is returned.

See also

Socket

  

Create new socket

Send

  

Send data through socket

RecvFrom

  

Receive data from an unconnected socket