suspend fun MqttClient.subscribeAwait(topic: String, qos: Int): Int
Subscribes to the topic with a specified QoS level
topic
- topic you subscribe on
subscribeSentHandler
- handler called after SUBSCRIBE packet sent with packetid
Returncurrent
MQTT client instance *
suspend fun MqttClient.subscribeAwait(topics: Map<String, Int>): Int
Subscribes to the topic and adds a handler which will be called after the request is sent
topics
- topics you subscribe on
subscribeSentHandler
- handler called after SUBSCRIBE packet sent with packetid
Returncurrent
MQTT client instance *