|
AWS IoT Device SDK C:
MQTT
MQTT 3.1.1 client library
|
| Return to main page ↑ |
MQTT client subscribe API definitions. More...
#include "aws_iot_mqtt_client_common_internal.h"Functions | |
| IoT_Error_t | aws_iot_mqtt_subscribe (AWS_IoT_Client *pClient, const char *pTopicName, uint16_t topicNameLen, QoS qos, pApplicationHandler_t pApplicationHandler, void *pApplicationHandlerData) |
| Subscribe to an MQTT topic. More... | |
| IoT_Error_t | aws_iot_mqtt_resubscribe (AWS_IoT_Client *pClient) |
| Subscribe to an MQTT topic. More... | |
MQTT client subscribe API definitions.
| IoT_Error_t aws_iot_mqtt_subscribe | ( | AWS_IoT_Client * | pClient, |
| const char * | pTopicName, | ||
| uint16_t | topicNameLen, | ||
| QoS | qos, | ||
| pApplicationHandler_t | pApplicationHandler, | ||
| void * | pApplicationHandlerData | ||
| ) |
Subscribe to an MQTT topic.
Called to send a subscribe message to the broker requesting a subscription to an MQTT topic.
| pClient | Reference to the IoT Client |
| pTopicName | Topic Name to publish to. pTopicName needs to be static in memory since no malloc is performed by the SDK |
| topicNameLen | Length of the topic name |
| qos | Quality of service for subscription |
| pApplicationHandler | Reference to the handler function for this subscription |
| pApplicationHandlerData | Point to data passed to the callback. pApplicationHandlerData also needs to be static in memory since no malloc is performed by the SDK |
| IoT_Error_t aws_iot_mqtt_resubscribe | ( | AWS_IoT_Client * | pClient | ) |
Subscribe to an MQTT topic.
Called to resubscribe to the topics that the client has active subscriptions on. Internally called when autoreconnect is enabled
| pClient | Reference to the IoT Client |