suspend fun MqttClient.connectAwait(port: Int, host: String): MqttConnAckMessage suspend fun MqttClient.connectAwait(port: Int, host: String, serverName: String): MqttConnAckMessage
Connects to an MQTT server calling connectHandler after connection |
|
suspend fun MqttClient.disconnectAwait(): Unit
Disconnects from the MQTT server calling disconnectHandler after disconnection |
|
suspend fun MqttClient.publishAwait(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): Int
Sends the PUBLISH message to the remote MQTT server |
|
suspend fun MqttClient.subscribeAwait(topic: String, qos: Int): Int
Subscribes to the topic with a specified QoS level 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 |
|
suspend fun MqttClient.unsubscribeAwait(topic: String): Int
Unsubscribe from receiving messages on given topic |