Functional extension of the WolfMQTT library with an interface providing the Reason Code on MQTT disconnect triggered by the broker.
If the broker sends a DISCONNECT with a Reason Code allow client to be able to read the corresponding Reason Code value as numerical value using the disconnect callback.
This addresses ZD15147
Test with mqttclient adding an invalid publish to the # topic:
Functional extension of the WolfMQTT library with an interface providing the Reason Code on MQTT disconnect triggered by the broker.
If the broker sends a DISCONNECT with a Reason Code allow client to be able to read the corresponding Reason Code value as numerical value using the disconnect callback.
This addresses ZD15147
Test with mqttclient adding an invalid publish to the
#
topic:Build wolfMQTT with:
Connect to the test broker with:
In the output you'll see: