close a transport endpoint
cc [options] file -lnsl
int t_close(int fd);
This function is a TLI/XTI local management routine used
to close a transport endpoint.
The t_close function indicates to
the transport provider that the user
is finished with the transport endpoint specified by fd.
In addition, t_close
closes the file associated with the transport endpoint
and frees any local library resources associated with the endpoint.
the file descriptor for the transport endpoint specified by fd.
On entry, any except T_UNINIT;
T_UNINIT on exit.
X/Open® Transport Interface Library (shared object)
Network Services Library (shared object)
t_close should be called from the T_UNBND state
However, this function does not check state information,
so it may be called from any valid state to close a transport endpoint.
If this occurs, the local library resources associated with the endpoint
will be freed automatically.
t_close returns 0 on success and -1 on failure and
t_errno is set to indicate the error.
On failure, t_errno may be set to the following:
The specified file descriptor does not refer to a transport endpoint.
A communication problem has been detected with the transport provider
and there is no other value of t_errno to describe
the error condition.
If t_close is issued while a transport address is bound
to an endpoint, the address will be unbound.
If t_close is called when the transport connection is still
active, the connection will be aborted, the file descriptor will be
closed, and the transport connection
associated with that endpoint will be broken for any process that
references that endpoint.
t_close should not be
issued on a connection endpoint before data
has been successfully transmitted and received or data may be lost.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004