sock_dataready(3z)

NAME
sock_dataready - test whether a network connection has incoming data

SYNOPSIS
#include <net/socket.h>

size_t sock_dataready(SOCKET *s);

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

The sock_dataready() function tests whether a socket has data waiting to be read by the user program.

RETURN VALUE
sock_dataready() returns the amount of data waiting in the input queue.

SEE ALSO
sock_read(3z)

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