help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

Recv

Receive data on socket

Declaration

Source position: socketsh.inc line 183

function Recv(

  Sock: LongInt;

  var Buf;

  BufLen: LongInt;

  Flags: LongInt

):LongInt;

Description

Recv reads at most Addrlen bytes from socket Sock into address Addr. The socket must be in a connected state. Flags can be one of the following:

1
Process out-of band data.
4
Bypass routing, use a direct interface.
??
Wait for full request or report an error.

The functions returns the number of bytes actually read from the socket, or -1 if a detectable error occurred.

Errors

Errors are reported in SocketError, and include the following:

SYS_EBADF
The socket descriptor is invalid.
SYS_ENOTCONN
The socket isn't connected.
SYS_ENOTSOCK
The descriptor is not a socket.
SYS_EFAULT
The address is outside your address space.
SYS_EMSGSIZE
The message cannot be sent atomically.
SYS_EWOULDBLOCK
The requested operation would block the process.
SYS_ENOBUFS
The system doesn't have enough free buffers available.

See also

Send

  

Send data through socket

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505