Connect
Connect(host AS String [, port AS Integer [, username AS String[, password AS String]]]) As Integer
Connects the client to a broker.
Parameters:
- Host: the hostname or IP address of the remote broker
- Port: the network port of the server host to connect to. Defaults to 1883.
- Username: Username for broker authentication.
- Password: Password for broker authentication.
Returns 0 if success, otherwise the error code.