Closes a transport end point.
Transport Layer Interface Library (libtli.a)
int t_close(fd) int fd;
The t_close subroutine informs the transport provider that the user is finished with the transport end point specified by the fd parameter and frees any local library resources associated with the end point. In addition, the t_close subroutine closes the file associated with the transport end point.
The t_close subroutine should be called from the T_UNBND state (see the t_getstate subroutine). However, this subroutine does not check state information, so it may be called from any state to close a transport end point. If this occurs, the local library resources associated with the end point are freed automatically. In addition, the close subroutine is issued for that file descriptor. The close subroutine is abortive if no other process has that file open, and will break any transport connection that may be associated with that end point.
|fd||Specifies the transport end point to be closed.|
On successful completion, the t_connect subroutine returns a value of 0. Otherwise, it returns a value of -1, and the t_errno variable is set to indicate the error.
If unsuccessful, the t_errno variable is set to the following:
|TBADF||The specified file descriptor does not refer to a transport end point.|
This subroutine is part of Base Operating System (BOS) Runtime.
The close subroutine, t_getstate subroutine, t_open subroutine, t_unbind subroutine.
List of Streams Programming References and STREAMS Overview in AIX Version 4.3 Communications Programming Concepts.