Connection status

CS_CON_STATUS is a CS_INT-sized bitmask that reflects a connection’s current status.

The following table lists the symbolic values that make up CS_CON_STATUS:

Symbolic value

Meaning

CS_CONSTAT_CONNECTED

The connection is open.

CS_CONSTAT_DEAD

The connection has been marked as “dead.”

Client-Library marks a connection as dead if errors have made it unusable or if an application’s client message callback routine returns CS_FAIL. An application must call ct_close and ct_con_drop to close and drop connections that have been marked as “dead,” or unusable. An exception to this rule occurs for certain types of results-processing errors. If a connection is marked dead while processing results, the application can try reviving the connection by calling ct_cancel with type as CS_CANCEL_ALL or CS_CANCEL_ATTN. If this fails, the application must close and drop the connection.