Diffusion C API  6.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
retry-strategy.h File Reference

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_Tdiffusion_retry_strategy_create (uint32_t interval, uint32_t attempts, DIFFUSION_API_ERROR *api_error)
 Creates a new retry strategy. More...
 
DIFFUSION_RETRY_STRATEGY_Tdiffusion_retry_strategy_no_retry ()
 Creates a new retry strategy that indicates that no retry is to be attempted. More...
 
DIFFUSION_RETRY_STRATEGY_Tdiffusion_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. More...
 
void diffusion_retry_strategy_free (DIFFUSION_RETRY_STRATEGY_T *retry_strategy)
 Free a retry strategy. More...
 
uint32_t diffusion_retry_strategy_get_interval (DIFFUSION_RETRY_STRATEGY_T *retry_strategy)
 Returns the number of milliseconds between retries. More...
 
uint32_t diffusion_retry_strategy_get_attempts (DIFFUSION_RETRY_STRATEGY_T *retry_strategy)
 Returns the maximum number of retries to attempt. More...
 

Detailed Description

Functions relating to initial session establishment retry strategy.

Function Documentation

DIFFUSION_RETRY_STRATEGY_T* diffusion_retry_strategy_create ( uint32_t  interval,
uint32_t  attempts,
DIFFUSION_API_ERROR api_error 
)

Creates a new retry strategy.

Parameters
intervalthe number of milliseconds before the first retry and between subsequent retries.
attemptsthe number of retry attempts.
api_errorpopulated on API error. Can be NULL.
Returns
The new retry strategy if the operation was successful, NULL otherwise. In this case, if a non-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.

Parameters
intervalthe number of milliseconds before the first retry and between subsequent retries.
api_errorpopulated on API error. Can be NULL.
Returns
The new retry strategy if the operation was successful, NULL otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
void diffusion_retry_strategy_free ( DIFFUSION_RETRY_STRATEGY_T retry_strategy)

Free a retry strategy.

Parameters
retry_strategythe 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.

Parameters
retry_strategythe retry strategy.
Returns
The maximum number of retries to attempt.
uint32_t diffusion_retry_strategy_get_interval ( DIFFUSION_RETRY_STRATEGY_T retry_strategy)

Returns the number of milliseconds between retries.

Parameters
retry_strategythe retry strategy.
Returns
The number of milliseconds between retries.
DIFFUSION_RETRY_STRATEGY_T* diffusion_retry_strategy_no_retry ( )

Creates a new retry strategy that indicates that no retry is to be attempted.

Returns
The new retry strategy.