NIO CommKit Host Interface Installation and System Administration Manual
DK_FLUSH(3X) DK_FLUSH(3X)
E-50 CommKit Host Interface, Release 4.0
NAME
dk_flush – change close processing for an AT&T data switch connection
SYNOPSIS
dk_flush(fd, flush_time)
int fd;
int flush_time;
extern int dk_verbose;
DESCRIPTION
dk_flush changes the close processing for flushing queued transmit user data on an AT&T data switch
connection. The close processing assumes the remote endpoint is actively reading the transmitted data. The
argument flush_time controls how long the close function will wait for data to drain. flush_time can be one
of the following:
-1 wait for all of the queued user data to drain to the remote endpoint of the AT&T data
switch connection.
0 compute a time delay based on the queued user data to the remote endpoint of the
AT&T data switch connection. This assumes data drains at a rate of 10 bytes per
second, equivalent to a 110 baud printer.
> 0 wait the specified seconds for the queued user data to drain to the remote endpoint of
the AT&T data switch connection.
The waiting for the queued user data to drain occurs when the user closes the fd, via close(2) or exit(2). When
the queued data doesn’t drain or the remote endpoint disconnects the circuit, close(2) fails and returns an error
to allow the user to determine the failure condition. This error return only occurs when dk_flush(3X) is
called. The possible return values from close(2) are:
EINTR A signal was received during close(2).
ENXIO The remote endpoint of the AT&T data switch connection terminated the connection.
The queued data may have been received by the remote endpoint before the connection
was terminated. This is dependent on the characteristics of the remote endpoint.
ETIME The requested or computed time expired, and the queued data was not sent to the
remote endpoint of the AT&T data switch connection.
In all cases, when close(2) returns the AT&T data switch connection is disconnected.
FILES
/usr/lib/libdk.so host interface subroutine library
SEE ALSO
dkhs(7), streamio(7)
DIAGNOSTICS
A successful return is zero, while an error return is a negative number. dk_flush prints a message on stderr
when it fails, unless the external variable dk_verbose has the value of zero(0) before the call to dk_flush(3X).
WARNINGS
A successful return from close(2) means the remote endpoint has received the data, but doesn’t guarantee the
user-application has received the data.