Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
recv64_(2) OSS System Calls Reference Manual
NAME
recv64_ - Receives a message from a connected socket
LIBRARY
H-series and J-series OSS processes: implicit libraries
32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/yputdll
SYNOPSIS
#define _XOPEN_SOURCE_EXTENDED 1
#include <sys/socket.h>
long long recv64_(
int socket,
void _ptr64 *buffer,
unsigned long long length,
int flags);
PARAMETERS
socket Specifies the file descriptor of the socket.
buffer Points to the buffer where the message should be written.
length Specifies the length in bytes of the buffer pointed to by the buffer parameter.
flags Is a value that controls message reception. The value of the flags parameter is
formed by bitwise ORing zero or more of the following values:
MSG_OOB Requests out-of-band data.
MSG_PEEK Peeks at an incoming message. The data is treated as unread and
the next call to the recv64_() function (or similar function) will
still return this data.
DESCRIPTION
The recv64_() function receives messages from a connected socket.
For message-based sockets (sockets of type SOCK_DGRAM), the entire message must be read
in one call. If a message is too long to fit in the supplied buffer and MSG_PEEK is not set in the
flags parameter, the excess bytes are discarded.
For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored.
For such sockets, data is returned as soon as it becomes available; no data is discarded.
If no messages are available at the socket and the socket’s file descriptor is blocking
(O_NONBLOCK is not set), the recv64_() function blocks until a message arrives. If no mes-
sages are available at the socket and the socket’s file descriptor is marked nonblocking
(O_NONBLOCK is set), the recv64_() function fails and sets errno to [EWOULDBLOCK].
To pass a 32-bit pointer from a 32-bit Guardian or OSS client, recv() or recv64_() may be
called.
To pass a 64-bit pointer from a 32-bit Guardian or OSS client, recv64_() must be called.
32-bit Guardian and 64-bit OSS clients can pass 32-bit pointers and 64-bit pointers to recv64_( ).
6−24 Hewlett-Packard Company 527186-023