MQTT API Reference
MQTT 3.1.1 client library
|
Subscribes to the given array of topic filters with a timeout.
This function transmits an MQTT SUBSCRIBE packet to the server, then waits for a server response to the packet. Internally, this function is a call to IotMqtt_Subscribe followed by IotMqtt_Wait. See IotMqtt_Subscribe for more information about the MQTT SUBSCRIBE operation.
[in] | mqttConnection | The MQTT connection to use for the subscription. |
[in] | pSubscriptionList | Pointer to the first element in the array of subscriptions. |
[in] | subscriptionCount | The number of elements in pSubscriptionList. |
[in] | flags | Flags which modify the behavior of this function. See MQTT Function Flags. Currently, flags are ignored by this function; this parameter is for future-compatibility. |
[in] | timeoutMs | If the MQTT server does not acknowledge the subscriptions within this timeout, this function returns IOT_MQTT_TIMEOUT. |