DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 
(TLI/XTI)

t_close(NET)


t_close -- close a transport endpoint

Syntax

TLI syntax

cc . . . -lnsl

#include <sys/tiuser.h>

int t_close (fd) int fd;

XTI syntax

cc . . . -lxti

#include <xti.h>

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. In addition, t_close closes the file associated with the transport endpoint.

The t_close function should be called from the T_UNBND state (see t_getstate(NET)). 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. In addition, close(S) will 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.

Return values

t_close returns 0 on success and -1 on failure, and t_errno is set to indicate the error.

Diagnostics

On failure, t_errno may be set to the following:

[TBADF]
The specified file descriptor does not refer to a transport endpoint.

See also

Intro(NET), t_getstate(NET), t_open(NET), t_unbind(NET)

Standards conformance

t_close is conformant with:

AT&T SVID Issue 3 ;
X/Open CAE Specification, Networking Services, Issue 4, 1994. ;
and Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2) .


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003