HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
t
t_close(3) t_close(3)
NAME
t_close() - close a transport endpoint
SYNOPSIS
#include <xti.h> /* for X/OPEN Transport Interface - XTI */
/* or */
#include <tiuser.h> /* for Transport Layer Interface - TLI */
int t_close (fd);
int fd;
DESCRIPTION
The t_close() function informs the transport provider that the user is finished with the transport end-
point 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()
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.
Thread-Safeness
The
t_close() function is safe to be called by multithreaded applications, and it is thread-safe for both
POSIX Threads and DCE User Threads. It has a cancellation point. It is neither async-cancel safe nor
async-signalsafe. Finally, it is not fork-safe.
Valid States
All - apart from T_UNINIT
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.
ERRORS
[TBADF] The specified file descriptor does not refer to a transport endpoint.
[TPROTO] (XTI only) This error indicates that a communication problem has been detected
between XTI and the transport provider for which there is no suitable XTI
(
t_errno).
SEE ALSO
t_getstate(3), t_open(3), t_unbind(3).
STANDARDS CONFORMANCE
t_close(): SVID2, XPG3, XPG4
Section 3−−918 − 1 − HP-UX Release 11i: December 2000
___
___