sock_closed(3z)

NAME
sock_closed - test whether a network connection is closed

SYNOPSIS
#include <net/socket.h>

bool_t sock_closed(SOCKET *s);

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

The sock_closed() function tests whether a socket is closed i.e. connection to a remote host has not been established or has already been closed by the kernel.

A socket of prot_UDP is never closed.

RETURN VALUE
sock_closed() returns TRUE or FALSE

SEE ALSO
sock_opened(3z)

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