![]() |
Diffusion C API 6.11.5
|
Functions relating to initial session establishment retry strategy. More...
Typedefs | |
typedef struct DIFFUSION_RETRY_STRATEGY_T | DIFFUSION_RETRY_STRATEGY_T |
An opaque diffusion session establishment retry strategy struct. | |
Functions | |
DIFFUSION_RETRY_STRATEGY_T * | diffusion_retry_strategy_create (uint32_t interval, uint32_t attempts, DIFFUSION_API_ERROR *api_error) |
Creates a new retry strategy. | |
DIFFUSION_RETRY_STRATEGY_T * | diffusion_retry_strategy_dup (DIFFUSION_RETRY_STRATEGY_T *strategy) |
Duplicates a retry strategy. | |
DIFFUSION_RETRY_STRATEGY_T * | diffusion_retry_strategy_no_retry () |
Creates a new retry strategy that indicates that no retry is to be attempted. | |
DIFFUSION_RETRY_STRATEGY_T * | diffusion_retry_strategy_create_interval_only (uint32_t interval, DIFFUSION_API_ERROR *api_error) |
Creates a new retry strategy that will retry indefinitely at the specified interval. | |
void | diffusion_retry_strategy_free (DIFFUSION_RETRY_STRATEGY_T *retry_strategy) |
Free a retry strategy. | |
uint32_t | diffusion_retry_strategy_get_interval (DIFFUSION_RETRY_STRATEGY_T *retry_strategy) |
Returns the number of milliseconds between retries. | |
uint32_t | diffusion_retry_strategy_get_attempts (DIFFUSION_RETRY_STRATEGY_T *retry_strategy) |
Returns the maximum number of retries to attempt. | |
Functions relating to initial session establishment retry strategy.
DIFFUSION_RETRY_STRATEGY_T * diffusion_retry_strategy_create | ( | uint32_t | interval, |
uint32_t | attempts, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Creates a new retry strategy.
A retry strategy will be applied when an initial attempt to open a session fails with a transient exception.
A retry strategy will be applied when recovering by a DIFFUSION_RECOVERABLE_UPDATE_STREAM_T
following a recoverable exception.
The strategy is defined in terms of number of milliseconds between retries and the maximum number of retries to attempt.
interval | the number of milliseconds before the first retry and between subsequent retries. |
attempts | the number of retry attempts. |
api_error | populated on API error. Can be NULL. |
api_error
pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free
. DIFFUSION_RETRY_STRATEGY_T * diffusion_retry_strategy_create_interval_only | ( | uint32_t | interval, |
DIFFUSION_API_ERROR * | api_error | ||
) |
Creates a new retry strategy that will retry indefinitely at the specified interval.
interval | the number of milliseconds before the first retry and between subsequent retries. |
api_error | populated on API error. Can be NULL. |
api_error
pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free
. DIFFUSION_RETRY_STRATEGY_T * diffusion_retry_strategy_dup | ( | DIFFUSION_RETRY_STRATEGY_T * | strategy | ) |
Duplicates a retry strategy.
strategy | The retry strategy to bee duplicated |
void diffusion_retry_strategy_free | ( | DIFFUSION_RETRY_STRATEGY_T * | retry_strategy | ) |
Free a retry strategy.
retry_strategy | the retry strategy to be freed. |
uint32_t diffusion_retry_strategy_get_attempts | ( | DIFFUSION_RETRY_STRATEGY_T * | retry_strategy | ) |
Returns the maximum number of retries to attempt.
retry_strategy | the retry strategy. |
uint32_t diffusion_retry_strategy_get_interval | ( | DIFFUSION_RETRY_STRATEGY_T * | retry_strategy | ) |
Returns the number of milliseconds between retries.
retry_strategy | the retry strategy. |
DIFFUSION_RETRY_STRATEGY_T * diffusion_retry_strategy_no_retry | ( | ) |
Creates a new retry strategy that indicates that no retry is to be attempted.