mqtt_connect()
Description: |
Instructs the library to connect to the MQTT server (broker). |
Syntax: |
function mqtt_connect(byref dst_ip as string, dst_port as word, byref user as string, byref password as string, keep_alive as byte) as ok_ng |
Returns: |
OK (success) or NG (failure) |
See Also: |
Parameter |
Description |
dst_ip |
The IP address of the MQTT server. |
dst_port |
Target port on the MQTT server. |
user |
MQTT server login name. |
password |
MQTT server login password. |
keep_alive |
The interval, in seconds, at which the server will ping this device. |
Details
Calling this function instructs the library to startconnecting to the server. Callback_mqtt_connect_ok is called when the successful connection is made.