unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

T_CLOSE(3N)                                                        T_CLOSE(3N)



NAME
       t_close - close a transport endpoint

SYNOPSIS
       #include <&lt;tiuser.h>&gt;

       int t_close(fd)
       int fd;

DESCRIPTION
       t_close() 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.

       t_close() should be called from the T_UNBND state (see t_getstate(3N)).
       However,  t_close()  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(2V) 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  associ-
       ated with that endpoint.

RETURN VALUES
       t_close() returns:

       0      on success.

       -1     on failure and sets t_errno to indicate the error.

ERRORS
       TBADF          The specified file descriptor does not refer to a trans-
                      port endpoint.

SEE ALSO
       close(2V), t_getstate(3N), t_open(3N), t_unbind(3N)

                                21 January 1990                    T_CLOSE(3N)