Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_close(3N) — SunOS 5.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close(2)

t_getstate(3N)

t_open(3N)

t_unbind(3N)

t_close(3N)

NAME

t_close − close a transport endpoint

SYNOPSIS

cc [ flag ... ] file ... −lnsl [ library ... ]

#include <tiuser.h>

int t_close(int fildes);

MT-LEVEL

MT-Safe

DESCRIPTION

The t_close() function informs the transport provider that the user is finished with the transport endpoint specified by fildes, and frees any local library resources associated with the endpoint.  In addition, t_close() closes the file associated with the transport endpoint. 

t_close() should be called from the T_UNBND state (see t_getstate(3N)).  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(2) will be issued for that file descriptor; if no other process has the file descriptor open, the close will terminate any connection that may be associated with that endpoint.  The connection termination will be abortive or orderly depending on the service type supported by the underlying transport provider. 

RETURN VALUES

t_close returns 0 on success.  On failure t_close returns −1, t_errno is set to indicate the error, and possibly errno is set. 

ERRORS

On failure, t_errno will be set to the following:

TBADF The specified file descriptor does not refer to a transport endpoint.  TSYSERR A system error occurred during execution of this function, errno will be set to the specific error. 

SEE ALSO

close(2), t_getstate(3N), t_open(3N), t_unbind(3N)

UNKNOWN TITLE ABBREVIATION: TRANSPORTDG

NOTES

This interface is safe in multithreaded applications. 

SunOS 5.5  —  Last change: 16 Mar 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026