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_getstate() - get current state

&pagelevel(4)&pagelevel

#include <xti.h>

int t_getstate(int fd);

Description

The t_getstate() function returns the current state of the transport endpoint.

Return value

If successful, the current state of the transport endpoint is returned.

If an error occurs, t_getstate() returns the value -1.

The current state of the transport endpoint can assume the following values:

T_UNBND

The transport endpoint is not bound to the transport service.

T_IDLE

The transport endpoint is bound to the transport system.

T_OUTCON

A sent connection request has not been processed yet.

T_INCON

An incoming connection request has not been processed yet.

T_DATAXFER

Data transfer phase.

T_OUTREL

A request for orderly connection shutdown was sent (wait for indication of an orderly connection shutdown).

T_INREL

Wait for a request for orderly connection shutdown.

If the transport provider is in a state transition at exactly the time of the t_getstate() call, t_getstate() terminates with an error.

Errors

TBADF

The specified file descriptor does not reference a transport endpoint.

TSTATECHNG

The transport provider is currently changing state.

TSYSERR

A system error occurred during execution of this function.

See also

t_open()