IoTHubModuleClient_SetMessageCallback

Function IoTHubModuleClient_SetMessageCallback 

Source
pub unsafe extern "C" fn IoTHubModuleClient_SetMessageCallback(
    iotHubModuleClientHandle: IOTHUB_MODULE_CLIENT_HANDLE,
    messageCallback: IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC,
    userContextCallback: *mut c_void,
) -> IOTHUB_CLIENT_RESULT
Expand description

@brief Sets up the message callback to be invoked when IoT Hub issues a message to the device. This is a blocking call.

@param iotHubModuleClientHandle The handle created by a call to the create function. @param messageCallback The callback specified by the device for receiving messages from IoT Hub. @param userContextCallback User specified context that will be provided to the callback. This can be @c NULL.

@warning: Do not call IoTHubModuleClient_Destroy() from inside your application’s callback.

@return IOTHUB_CLIENT_OK upon success or an error code upon failure.