-
Notifications
You must be signed in to change notification settings - Fork 1.4k
mqtt
Mark Wolfe edited this page Mar 19, 2014
·
3 revisions
These methods are the preferred method for generating mqtt clients and servers.
Create a new MqttServer (see: MqttServer)
-
[listener]- callback called on serverclientevent
Create a new MqttSecureServer
-
keyPath- path to private key file -
certPath- path to corresponding public cert -
[listener]- callback called on serverclientevent
Create a new MqttClient (see: MqttClient)
-
[port]- broker port (default: 1883) -
[host]- broker host (default: localhost) -
[options]- connect options
Create a new secure MqttClient
-
[port]- broker port (default: 1883) -
[host]- broker host (default: localhost) -
options- connection options, must include keys:-
keyPath- path to private key -
certPath- path to corresponding public cert
-
Create a new MqttConnection (see: MqttConnection)
-
[port]- broker port (default: 1883) -
[host]- broker host (default: localhost) -
[callback]- fired on underlying stream connect
Create a new MqttClient (see: MqttClient)
The brokerUrl supports normal connections using mqtt:// or tcp:// and secure connections using mqtts:// or ssl://.
Passing the clientId is also supported, for example mqtt://user@localhost?clientId=123abc.
-
brokerUrl- broker Url, which is required. -
[options]- connect options