Open topic with navigation
|Example||MQTT Vuser Functions|
mqtt_create creates one MQTT client and returns that client's handle. The client is discarded on Vuser termination.
Two clients per Vuser can be created.
The MQTT client handle.
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 */