Retrieve information from disconnect.
X/Open Transport Interface Library (libxti.a)
int t_rcvdis (fd, discon) int fd; struct t_discon *discon;
The t_rcvdis subroutine identifies the cause of a disconnect and retrieves any user data sent with the disconnect.
|fd||Identifies the local transport endpoint where the connection existed.|
|discon|| Points to a t_discon structure containing the following members:
If a user does not care if there is incoming data and does not need to know the value of the reason or sequence fields, the discon field value may be a null pointer and any user data associated with the disconnect will be discarded. However, if a user has retrieved more than one outstanding connect indication (via the t_listen subroutine) and the discon field value is a null pointer, the user will be unable to identify with which connect indication the disconnect is associated.
T_DATAXFER, T_OUTCON, T_OUTREL, T_INREL, T_INCON(ocnt > 0).
|-1||t_errno is set to indicate an error.|
On failure, t_errno is set to one of the following:
|TBADF||The specified file descriptor does not refer to a transport endpoint.|
|TBUFOVFLW||The number of bytes allocated for incoming data (maxlen) is greater than 0 but not sufficient to store the data. If the fd parameter is a passive endpoint with ocnt > 1, it remains in state T_INCON; otherwise, the endpoint state is set to T_IDLE.|
|TNODIS||No disconnect indication currently exists on the specified transport endpoint.|
|TNOTSUPPORT||This subroutine is not supported by the underlying transport provider.|
|TOUTSTATE||The subroutine was issued in the wrong sequence on the transport endpoint referenced by the fd parameter.|
|TPROTO||This error indicates that a communication problem has been detected between the X/Open Transport Interface and the transport provider for which there is no other suitable X/Open Transport Interface (t_errno).|
|TSYSERR||A system error has occurred during execution of this subroutine.|
The t_alloc subroutine, t_connect subroutine, t_listen subroutine, t_open subroutine, t_snddis subroutine.