Open topic with navigation
int mqtt_disconnect( MQTT handle);
|Example||MQTT Vuser Functions|
|handle||The MQTT client handle returned by mqtt_create.|
mqtt_disconnect disconnects the client from the broker.
If invalid arguments are passed, the Vuser aborts, even if Continue on error is set.
MQTT_SUCCESS or MQTT_FAIL
Standard parameterization is not available for this function.
This example shows how to create a connection handle, connect, and disconnect.
/* Declare MQTT client handle variable */
/* Create client object and assign its handle to a variable */
client = mqtt_create();
/* Connect MQTT client to a broker at test.broker.com using TCP port number 1883 and insecure channel */
..... Script logic .....
/* Disconnect MQTT client from the broker */