getCnxState

getCnxState — retrieves the operational state of the connector object.

Syntax

For C++, Java, and C#:

DHC_tState getCnxState(void);

Returns

The current state of the connector object, a member of DHC_tState as defined below.

Description

Retrieves the state of the DataHub connector object. The state is primarily informational, since the user cannot directly change it.

StateDescription
DHC_STATE_NONEThis is the initial (0) state, and is immediately changed to DHC_STATE_IDLE within the constructor unless a fundamental initialization error has occurred (eg. Window creation).
DHC_STATE_IDLEA connection has never been attempted.
DHC_STATE_INITIALIZEDInternal initialization completed (by the first attempt to connect) and ready to connect.
DHC_STATE_CONNECTINGCurrently in the process of connecting. See getCnxSubStateString for detailed connection sub-state.
DHC_STATE_CONNECTING_CLOSINGThis is a transient internal state used to force closure of an open connection before attempting to reconnect.
DHC_STATE_CONNECTEDA DataHub connection exists.
DHC_STATE_ERRORAn error was detected. See getErrString. This is generally a transient state, since the default behaviour is to attempt to reconnect.
DHC_STATE_RETRY_DELAYThe reconnection timer is active and after which an attempt will be made to reconnect (see setReconnectionDelay).

See Also

onStatusChange, getCnxStateString, getCnxSubStateString, isConnecting, isConnected, getErrString, getReconnectionDelay, setReconnectionDelay