AWS IoT Device SDK C: MQTT
MQTT 3.1.1 client library
Return to main page ↑
Handles

Opaque handles of the MQTT library. More...

Typedefs

typedef struct _mqttConnectionIotMqttConnection_t
 Opaque handle of an MQTT connection. More...
 
typedef struct _mqttOperation * IotMqttOperation_t
 Opaque handle that references an in-progress MQTT operation. More...
 

Detailed Description

Opaque handles of the MQTT library.

Typedef Documentation

◆ IotMqttConnection_t

Opaque handle of an MQTT connection.

MQTT connection handle type. MQTT connection handles are created by successful calls to IotMqtt_Connect and are used to refer to the connection when calling MQTT library functions.

A call to IotMqtt_Disconnect makes a connection handle invalid. Once IotMqtt_Disconnect returns, the connection handle should no longer be used.

All instances of IotMqttConnection_t should be initialized with IOT_MQTT_CONNECTION_INITIALIZER.

◆ IotMqttOperation_t

typedef struct _mqttOperation* IotMqttOperation_t

Opaque handle that references an in-progress MQTT operation.

Set as an output parameter of IotMqtt_PublishAsync, IotMqtt_SubscribeAsync, and IotMqtt_UnsubscribeAsync. These functions queue an MQTT operation; the result of the operation is unknown until a response from the MQTT server is received. Therefore, this handle serves as a reference to MQTT operations awaiting MQTT server response.

This reference will be valid from the successful return of IotMqtt_PublishAsync, IotMqtt_SubscribeAsync, or IotMqtt_UnsubscribeAsync. The reference becomes invalid once the completion callback is invoked, or IotMqtt_Wait returns.

All instances of IotMqttOperation_t should be initialized with IOT_MQTT_OPERATION_INITIALIZER.

See also
IotMqtt_Wait and IOT_MQTT_FLAG_WAITABLE for waiting on a reference. IotMqttCallbackInfo_t and IotMqttCallbackParam_t for an asynchronous notification of completion.