Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

netread(3) [debian man page]

NETREAD(3)						     Common Library Functions							NETREAD(3)

NAME
netread - receive a message from a socket SYNOPSIS
#include "net.h" int netread (int s, char *buf, int nbytes); ssize_t netread_timeout (int s, void *buf, size_t nbytes, int timeout); DESCRIPTION
netread receives a message from a socket. It overcomes the message fragmentation problem and always waits for all requested bytes to arrive or a timeout/error occurs. RETURN VALUE
This routine returns the number of bytes if the operation was successful, 0 if the connection was closed by the remote end or -1 if the operation failed. In the latter case, serrno is set appropriately. ERRORS
EINTR The function was interrupted by a signal. EBADF s is not a valid descriptor. EAGAIN The socket is non-blocking and there is no message available. EFAULT buf is not a valid pointer. EINVAL nbytes is negative or zero. ENOTSOCK s is not a socket. SECONNDROP Connection closed by remote end. SETIMEDOUT Timed out. SEE ALSO
recv(2), neterror(3) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/29 09:27:19 $ NETREAD(3)

Check Out this Related Man Page

RFIO_FSEEK(3)						      Rfio Library Functions						     RFIO_FSEEK(3)

NAME
rfio_fseek - positions/repositions a file SYNOPSIS
#include <sys/types.h> #include "rfio_api.h" int rfio_fseek (FILE *fp, long offset, int whence); Under Linux, for large files: #define _LARGEFILE64_SOURCE #include <sys/types.h> #include "rfio_api.h" int rfio_fseeko64 (FILE *fp, off64_t offset, int whence); For large files, under other systems: #include <sys/types.h> #include "rfio_api.h" int rfio_fseeko64 (FILE *fp, off64_t offset, int whence); DESCRIPTION
rfio_fseek positions/repositions to offset the file associated with the descriptor fp generated by a previous rfio_fopen. whence indicates how to interpret the offset value: SEEK_SET The offset is set from beginning of file. SEEK_CUR The offset is added to current position. SEEK_END The offset is added to current file size. rfio_fseeko64 can be used with large files and allows to use a 64 bit offset rather than a long. RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately. ERRORS
EBADF fp is not a valid descriptor. EINVAL incorrect value for whence. SENOSHOST Host unknown. SENOSSERV Service unknown. SETIMEDOUT Timed out. SEBADVERSION Version ID mismatch. SEINTERNAL Internal error. SECONNDROP Connection closed by remote end. SECOMERR Communication error. SEE ALSO
rfio_fopen(3) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/31 13:13:02 $ RFIO_FSEEK(3)
Man Page