HPlogo HP-UX Reference Volume 4 of 5 > t

t_close(3)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

t_close() — close a transport endpoint

SYNOPSIS

#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

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

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 async-cancel safe nor async-signal safe. Finally, it is not fork-safe.

Valid States

All - apart from T_UNINIT

RETURN VALUE

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

[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).

STANDARDS CONFORMANCE

t_close(): SVID2, XPG3, XPG4

© Hewlett-Packard Development Company, L.P.