TCP/IP Programming Manual
C Synopsis
#include <socket.h>
#include <netdb.h>
nrcvd = recv64_ (socket, buffer_ptr64, length, flags);
error = recv_nw64_ (socket, buffer_ptr64, length, flags, tag);
int nrcvd, socket;
char _ptr64 *buffer_ptr64;
int length, flags, error;
long long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
nrcvd := recv64_ (socket, buffer_ptr64, length, flags);
error := recv_nw64_ (socket, buffer_ptr64, length, flags, tag);
INT(32) nrcvd,
socket;
STRING .EXT64 buffer_ptr64;
INT(32) length,
flags,
error;
INT(64) tag;
nrcvd
return value; the number of bytes received by the recv64_ function. A zero length message
indicates end of file (EOF).
If the call is not successful, —1 is returned and the external variable errno is set as indicated
in Errors (page 157).
error
return value; if the call is successful, a zero is returned. If the call is not successful, —1 is
returned. If the call fails, the external variable errno is set as indicated in Errors (page 157).
socket
input value; specifies the socket number for the socket, as returned by the call to socket or
socket_nw.
buffer_ptr64
input and return value; on completion, points to the received data.
length
input value; the size of the buffer pointed to by buffer_ptr64.
flags
input value; specifies the kind of data to be read and is one or more of the following:
Read out-of-band data. This corresponds to the TCP URG flag. The call fails if you select
this flag for UDP sockets. This is a constraint imposed by UDP, which does not support
out-of-band data.
MSG_OOB
Read the incoming message without removing it from the input queue.MSG_PEEK
No flag; read data normally.0
156 Library Routines