Determine whether a socket is at the out-of-band mark
#include <sys/socket.h> int sockatmark( int s );
- The file descriptor of the socket that you want to check, as returned by socket() .
Use the -l socket option to qcc to link against this library.
The sockatmark() function determines whether the socket specified by s is at the out-of-band data mark. If the protocol for the socket supports out-of-band data by marking the stream with an out-of-band data mark, sockatmark() returns 1 when all data preceding the mark has been read and the out-of-band data mark is the first element in the receive queue.
The sockatmark() function doesn't remove the out-of-band data mark from the stream.
Using this function between receive operations lets an application determine which data comes before and after out-of-band data.
- The socket isn't at the out-of-band data mark.
- The socket is at the out-of-band data mark.
- An error occurred (errno is set).
- Invalid file descriptor s.
- The s argument isn't the file descriptor of a valid socket.