xref: /minix3/minix/man/man2/recv.2 (revision 0b98e8aad89f2bd4ba80b523d73cf29e9dd82ce1)
RECV 2
NAME
recv - receive a message through a socket
SYNOPSIS
#include <sys/socket.h> ssize_t recv(int sd, void * msg, size_t msg_len, int flags);

DESCRIPTION
recv() receives a message from another socket. It may only be used with connected sockets. At present, minix doesn't support setting flags to any value other than 0.
RETURN VALUES
On success, this function returns 0. On error, -1 is returned and errno is set.
ERRORS

15 [ENOSYS] The operation is not implemented for the given socket.

15 [EPIPE] The socket is shutdown for reading.

SEE ALSO
recvfrom(2), socket(2), send(2), sendto(2)