sock_read(3z)

NAME
sock_read - read bytes from a network socket

SYNOPSIS
#include <net/socket.h>

size_t sock_read(SOCKET * s, void * dp , size_t len);

DESCRIPTION
The parameter s is a descriptor to an open socket created using sock_open(3z) or sock_listen(3z)

The sock_read() function reads at most len bytes from the socket s and places them at dp. dp which should be in the lower 16k of the memory map.

RETURN VALUE
The sock_read() function returns the number of bytes read from the socket. If an illegal socket is supplied the carry flag will be set and the return value will be EPROTONOSUPPORT.

AUTHOR
Dominic Morris <dom@jb.man.ac.uk>