SOCKATMARK(3) BSD Programmer's Manual SOCKATMARK(3)NAMEsockatmark - determine whether a socket is at out-of-band data mark
SYNOPSIS
#include <sys/socket.h>
int
sockatmark(int s);
DESCRIPTION
The sockatmark() call determines whether the socket associated with s is
at the out-of-band data mark. If the protocol for the socket marks the
data stream at a point associated with out-of-band or urgent data, this
function returns true when all data prior to the mark have been read.
Reading additional data after the mark causes the mark to be cleared.
The sockatmark() function provides a standard interface to the SIOCATMARK
command to ioctl(2).
DIAGNOSTICS
The function returns 1 if the socket is at the out-of-band data mark, and
a 0 if the socket is not at an out-of-band data mark. It returns -1 if
an error is detected.
ERRORS
The call succeeds unless:
[EBADF] S is not a valid descriptor.
[ENOTTY] S does not specify a socket.
SEE ALSOrecv(2), send(2)STANDARDS
The sockatmark() function conforms to draft 6.6 of IEEE Std 1003.1g.
July 29, 1997 1