Function anjay_all_connections_failed

Function Documentation

bool anjay_all_connections_failed(anjay_t *anjay)

Tests if Anjay gave up on any further server connection attempts. It will happen if none of the configured servers could be reached.

If this function returns true, it means that Anjay is in an essentially non-operational state. anjay_transport_schedule_reconnect may be called to reset the failure state and retry connecting to all configured servers. anjay_transport_schedule_reconnect will do the same, but only for the specified transports. Alternatively, anjay_enable_server may be used to retry connection only to a specific server.

Parameters:

anjay – Anjay object to operate on.

Returns:

0 on success, a negative value in case of error.