dnet_eof(3dn)
NAME
dnet_eof − test the state of a connection
SYNTAX
int dnet_eof (s)
int s;
ARGUMENTS
Input Argument
s Specifies the socket whose connection is to be checked.
DESCRIPTION
The dnet_eof subroutine tests a DECnet socket to determine if an end-of-file (EOF) condition exists. An EOF on a DECnet socket indicates that it is impossible to read any more data because no more data exists for a read operation and the socket is no longer connected.
This subroutine is useful for determining if an EOF condition exists on a DECnet sequenced packet socket when a read operation has returned zero bytes. ULTRIX uses a returned value of zero on a read operation to indicate EOF. Since it is always possible to read a zero length packet on a DECnet sequenced packet socket, you cannot determine whether you have just read a zero length packet or reached EOF without using dnet_eof.
RETURN VALUE
If dnet_eof determines a connection to be in an active state, a value of 0 is returned. If dnet_eof determines a connection to be in an inactive state, a nonzero value is returned.
SEE ALSO
DECnet-ULTRIX User’s and Programmer’s Guide