Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 | both |
#define _XOPEN_SOURCE_EXTENDED 1
#include <xti.h>
int t_rcvdis(int fd, struct t_discon *discon);
struct netbuf udata;
int reason;
int sequence;
The field reason specifies
the reason for the disconnect through a protocol-dependent reason
code, udata is always empty since the TCP transport provider does
not support sending of user data with a disconnect, and sequence may
identify an outstanding connect indication with which the disconnect
is associated. The field sequence is only meaningful when
t_rcvdis() is issued by a passive transport user who has executed
one or more t_listen() functions and is processing the resulting
connect indications. If a disconnect indication occurs, sequence can
be used to identify which of the outstanding connect indications
is associated with the disconnect.If a user does not care if there is incoming data and does not need to know the value of reason or sequence, discon may be a NULL pointer. However, if a user has retrieved more than one outstanding connect indication (using t_listen() ) and discon is a NULL pointer, the user will be unable to identify with which connect indication the disconnect is associated.
Valid states: T_DATAXFER,T_OUTCON,T_INCON(ocnt > 0)
If successful, t_rcvdis() returns 0.