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


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

IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetRetryPolicy(
  IOTHUB_MODULE_CLIENT_HANDLE  iotHubModuleClientHandle,
  size_t                       retryTimeoutLimitInSeconds


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

  • retryPolicy The policy to use to reconnect to IoT Hub when a connection drops.

  • retryTimeoutLimitInSeconds Maximum amount of time(seconds) to attempt reconnection when a connection drops to IOT Hub.

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

Return Value

IOTHUB_CLIENT_OK upon success or an error code upon failure.