Subscribe method
Subscribes to an MQTT topic.
Syntax
retCode
= mqttClient
.Subscribe
(subOption As MQTTSubscribeOption
)where
retCode
- is a constant of the MqttSubscriptionCode object.mqttClient
- is an MQTTClient object created by the MQTTFactory object's method CreateClient
.Example
Dim retCode As MqttSubscriptionCode Dim subOption As MQTTSubscribeOption Set subOption = MqttFactory.CreateSubscribeOption subOption.QoS = MqttQoS1 subOption.Topic = "Topic" subOption.Identifier = 1 retCode = mqttClient.Subscribe(subOption)
Provide Feedback