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

fpsend

Send data through socket

Declaration

Source position: socketsh.inc line 159

function fpsend(

  s: cint;

  msg: pointer;

  len: size_t;

  flags: cint

):ssize_t;

Description

fpSend sends Len bytes starting from address Msg to socket S. S must be in a connected state. Options can be passed in Flags.

The function returns the number of bytes sent, or -1 if a detectable error occurred.

Flags can be one of the following:

1
Process out-of band data.
4
Bypass routing, use a direct interface.

Errors

Errors are reported in SocketError, and include the following:

ESockEBADF
The socket descriptor is invalid.
ESockENOTSOCK
The descriptor is not a socket.
ESockEFAULT
The address is outside your address space.
ESockEMSGSIZE
The message cannot be sent atomically.
ESockEWOULDBLOCK
The requested operation would block the process.
ESockENOBUFS
The system doesn't have enough free buffers available.

See also

fpRecv

  

Receive data on socket


Documentation generated on: May 14 2021