t_close(3) t_close(3)
NAME [Toc] [Back]
t_close() - close a transport endpoint
SYNOPSIS [Toc] [Back]
#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 [Toc] [Back]
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() 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 [Toc] [Back]
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 asynccancel
safe nor async-signal safe. Finally, it is not fork-safe.
Valid States [Toc] [Back]
All - apart from T_UNINIT.
RETURN VALUE [Toc] [Back]
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 [Toc] [Back]
[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 [Toc] [Back]
t_getstate(3), t_open(3), t_unbind(3).
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
t_close(3) t_close(3)
STANDARDS CONFORMANCE [Toc] [Back]
t_close(): SVID2, XPG3, XPG4
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003 [ Back ] |