Previous Topic: RECVFROMNext Topic: Notes


Parameters

Parameter

Description

socket-descriptor

Specifies the name of a fullword field containing the socket descriptor from which to read.

buffer

Specifies the name of the area where the data is to be placed.

buffer-length

Specifies the name of a fullword field containing the length of the buffer. buffer-length can be specified as an absolute expression.

flags

Specifies the name of a fullword field containing information on how the data is to be received. The list of the different flags supported can be found in the MSGFLAGS DSECT generated by the #SOCKET TCPIPDEF macro call and in the SOCKET-MISC-DEFINITIONS record for other languages. For an explanation of flags that can be specified, see RECV function description.

sockaddr

Specifies the name of an area in which to return the sockaddr structure of the sender of the data. The format of this structure depends on the domain of the corresponding socket. This parameter can be assigned to NULL if the caller is not interested in the sender's address.

sockaddr-length

Specifies the name of a fullword field containing the length of sockaddr. If SOCKADDR is assigned to NULL, sockaddr-length must be 0. On return, sockaddr-length contains the size required to represent the socket. If the size of sockaddr is too small to contain the full sockaddr structure, it is truncated.

The maximum value for this parameter is 4096.

read-length

Specifies the name of a fullword field in which the actual length of the data read is returned.