IoTHubDeviceClient_GetRetryPolicy()

Sets up the connection status callback to be invoked representing the status of the connection to IOT Hub. This is a blocking call.

Syntax

#include "azure-iot-sdk-c/iothub_client/inc/iothub_device_client.h"

IOTHUB_CLIENT_RESULT IoTHubDeviceClient_GetRetryPolicy(
  IOTHUB_DEVICE_CLIENT_HANDLE  iotHubClientHandle,
  IOTHUB_CLIENT_RETRY_POLICY   retryPolicy,
  size_t *                     retryTimeoutLimitInSeconds
);

Parameters

  • iotHubClientHandle The handle created by a call to the create function.

  • retryPolicy Out parameter containing the policy to use to reconnect to IoT Hub.

  • retryTimeoutLimitInSeconds Out parameter containing maximum amount of time in seconds to attempt reconnection to IOT Hub.

NOTE: The application behavior is undefined if the user calls the IoTHubDeviceClient_LL_Destroy function from within any callback.

Return Value

IOTHUB_CLIENT_OK upon success or an error code upon failure.