Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.65 KB

iothubmoduleclient-setretrypolicy.md

File metadata and controls

40 lines (30 loc) · 1.65 KB
title titleSuffix description manager author ms.author ms.date ms.service ms.custom ms.topic
IoTHubModuleClient_SetRetryPolicy function reference | Microsoft Docs
Azure IoT C SDK
This is the function reference page for the IoTHubModuleClient_SetRetryPolicy() function in the Azure IoT C SDK. This SDK is used with Azure IoT Hub and Azure IoT Hub Device Provisioning Service
timlt
wesmc7777
wesmc
03/25/2022
iot-hub
reference

IoTHubModuleClient_SetRetryPolicy()

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_module_client.h"

IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetRetryPolicy(
  IOTHUB_MODULE_CLIENT_HANDLE  iotHubModuleClientHandle,
  IOTHUB_CLIENT_RETRY_POLICY   retryPolicy,
  size_t                       retryTimeoutLimitInSeconds
);

Parameters

  • 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.

: Do not call IoTHubModuleClient_Destroy() from inside your application's callback.

Return Value

IOTHUB_CLIENT_OK upon success or an error code upon failure.