Serialize an MQTT CONNECT packet in the given fixed buffer pFixedBuffer
.
MQTT_GetConnectPacketSize should be called with pConnectInfo
and pWillInfo
before invoking this function to get the size of the required MQTTFixedBuffer_t and remainingLength
. The remainingLength
must be the same as returned by MQTT_GetConnectPacketSize. The MQTTFixedBuffer_t must be at least as large as the size returned by MQTT_GetConnectPacketSize.
[in] | pConnectInfo | MQTT CONNECT packet parameters. |
[in] | pWillInfo | Last Will and Testament. Pass NULL if not used. |
[in] | remainingLength | Remaining Length provided by MQTT_GetConnectPacketSize. |
[out] | pFixedBuffer | Buffer for packet serialization. |
Example