axl_bool myqtt_conn_is_ok ( MyQttConn connection,
axl_bool  free_on_fail 

Allows to get current connection status.

This function will allow you to check if your myqtt connection is actually connected. You must use this function before calling myqtt_conn_new to check what have actually happen.

You can also use myqtt_conn_get_message to check the message returned by the myqtt layer. This may be useful on connection errors. The free_on_fail parameter can be use to free myqtt connection resources if this myqtt connection is not connected. This operation will be done by using myqtt_conn_close.

connectionthe connection to get current status.
free_on_failif axl_true the connection will be closed using myqtt_conn_close on not connected status.
current connection status for the given connection

References myqtt_conn_close(), myqtt_mutex_lock(), and myqtt_mutex_unlock().

Referenced by myqtt_conn_close(), myqtt_conn_get_next(), myqtt_conn_ping(), myqtt_conn_pub(), myqtt_conn_reconnect(), myqtt_conn_sub(), myqtt_conn_unsub(), myqtt_listener_accept_connection(), and myqtt_listener_shutdown().