axl_bool vortex_connection_is_ok ( VortexConnection connection,
axl_bool  free_on_fail 
)

Allows to get current connection status.

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

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

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

References vortex_connection_close(), vortex_mutex_lock(), and vortex_mutex_unlock().

Referenced by vortex_channel_block_until_replies_are_sent(), vortex_channel_get_reply(), vortex_channel_is_opened(), vortex_channel_new_full(), vortex_channel_notify_start(), vortex_channel_wait_reply(), vortex_connection_close(), vortex_connection_do_greetings_exchange(), vortex_connection_get_features(), vortex_connection_get_localize(), vortex_connection_get_opened_channels(), vortex_connection_reconnect(), vortex_connection_ref_internal(), vortex_connection_seq_frame_updates(), vortex_connection_seq_frame_updates_status(), vortex_external_connection_new(), vortex_external_listener_new(), vortex_frame_readline(), vortex_listener_accept_connection(), vortex_listener_shutdown(), vortex_sasl_start_auth(), vortex_tls_start_negotiation(), vortex_tls_start_negotiation_sync(), vortex_websocket_listener_new(), vortex_xml_rpc_boot_channel(), and vortex_xml_rpc_boot_channel_sync().