eclipse / paho.mqtt.c

An Eclipse Paho C client library for MQTT for Windows, Linux and MacOS. API documentation: https://eclipse.github.io/paho.mqtt.c/
https://eclipse.org/paho
Other
1.94k stars 1.09k forks source link

MQTTV5: server initiated disconnect #469

Closed icraggs closed 6 years ago

icraggs commented 6 years ago

308

Handle unsolicited disconnect from the server.

icraggs commented 6 years ago

Tests test10 and test11 demonstrate the capability.

setDisconnected() sets a disconnected callback which is called on receipt of a disconnect, and supplies the reason code and properties which were associated with it.