mqttdisconnect
Disconnect from the broker.
Attention: Valid only with Altair Communication Extension.
Syntax
[status, messageinfo] = mqttdisconnect(clientid)
Inputs
- clientid
- client id, an output of mqttclient.
Outputs
- Status
- disconnection status flag. values are 0,3,4.
- messageinfo
- description of disconnection status flag.
Examples
Disconnect to a broker after a connection has been lost
cld = mqttclient('test.mosquitto.org','port',1883);
[status,msgeinfo] = mqttdisconnect(cld)
status = 0
msgeinfo = client disconnect: successful