Amiga Unix — 68040 · 68060

Manual pages › Network library (3N)

t_close(3N)

close a transport endpoint

From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.

NAME

t_close - close a transport endpoint

SYNOPSIS

#include <tiuser.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.

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; 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. On failure, t_errno may be set to the following:

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

SEE ALSO

t_getstate(3N), t_open(3N), t_unbind(3N).
UNIX System V Network Programmer's Guide.

DIAGNOSTICS

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