Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

t_close() - close transport endpoint

&pagelevel(4)&pagelevel

#include <xti.h>

int t_close(int fd);

Description

The user calls the t_close() function to inform the transport provider that he no longer needs the transport endpoint specified by fd. t_close() releases all local library resources reserved for fd.

t_close() should be called in the T_UNBND state (see section "t_getstate() - get current state"). As t_close() does not check any state information, it can also be called in all other states to close a transport endpoint.

If there are no further descriptors for transport endpoint fd in the calling process or any other process, the transport endpoint is shut down completely, i.e. the system resources are released. Established connections are aborted and any data not already sent or not fetched by the receiver is lost.

Return value

0:

If successful.

-1:

If an error occurs. t_ errno is set to indicate the error.

Errors

TBADF

The specified file descriptor does not reference a transport endpoint.

See also

t_getstate(), t_open(), t_unbind()