t_close(3)
t_close − close a transport endpoint
SYNOPSIS
#include <xti.h> (for XTI)
or
#include <tiuser.h> (for TLI)
int t_close (fd)
int fd;
DESCRIPTION
The t_close function informs the transport provider that the user is finished with the transport endpoint specified by fd, and frees any local library resources associated with the endpoint. t_close also closes the file descriptor associated with the transport endpoint.
t_close should be called from the T_UNBND state (see t_getstate (3)). However, this function does not check state information, so it may be called from any state to close a transport endpoint. If this occurs, the local library resources associated with the endpoint will be freed automatically. close(2) will also be issued for that file descriptor; the close will be abortive if no other process has that file open, and will break any transport connection that may be associated with that endpoint.
ERRORS
[TBADF] The transport endpoint specified is not legal.
RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and t_errno is set to indicate the error.
NOTE
In HP-UX 9.0, XTI (X/Open Transport Interface) supports only OSI as a transport provider, and is available only as part of the OSI Transport Services 9000 product. Users of this product can access XTI versions of the t_* routines by linking with /usr/lib/libxti.a. For more information on XTI, see "HP-UX/9000 XTI Programmer’s Guide".
In HP-UX 9.0, TLI (Transport Layer Interface) supports any transport provider which is compliant with TPI (Transport Provider Interface). TLI is available only as part of the STREAMS product. Users of this product can access TLI versions of the t_* routines by linking with /usr/lib/libnsl_s.a. For more information on TLI, see the TLI section of "STREAMS/UX for HP 9000 Reference Manual".
SEE ALSO
t_getstate(3), t_open(3), t_unbind(3).
Hewlett-Packard Company — HP-UX Release 9.0: October 1992