First page Back Continue Last page Summary Graphics
Recv
#include <sys/types.h>
#include <sys/socket.h>
int recv(int s, void *buf, size_t len, int flags);
Receives a message from a socket, normally used on a connection mode socket
Returns as much available information as the size of the buffer supplied can hold.
If the socket is connection-oriented and the remote side has shut down the connection gracefully, a recv call completes with 0 bytes received. If the connection has been reset, recv fails and sets errno to ECONNRESET.