mqtt_connect()

Top  Previous  Next

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:

Step-by-step Usage Instructions

 


Part

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 start connecting to the server. Callback_mqtt_connect_ok is called when the successful connection is made.