CreateMqttClient
Create an MQTT client object
Connect
Connects to an MQTT server using the provided connect options.
Param Url : the address of the server to connect to, specified as a URI.
Param ClientId : a client identifier that is unique on the server being connected to
Param UserName : The user name for connecting to the MQTT broker.
Param Password : The password for connecting to the MQTT broker.
Subscribe
Subscribe to a topic, which may include wildcards.
Param TopicFilter : the topic to subscribe to, which can include wildcards.
Param QoS : The quality of service for the subscription
UnSubscribe
Requests the server unsubscribe the client from a topic.
Param TopicFilter : the topic to unsubscribe from. It must match a topicFilter specified on an earlier subscribe.
Publish
Publishes a message to a topic on the server
Param Topic : The topic to deliver the message to
Param Message : sent message
Param QoS : the Quality of Service to deliver the message at. Valid values are 0, 1, 2.
Param Retained : whether or not this message should be retained by the server.
Disconnect
Disconnects from the server.
BindConnectedDelegate
This method is called when the client is connected.
BindConnectionLostDelegate
This method is called when the connection to the server is lost.
BindMessageDelegate
This method is called when a message arrives from the server.