suspend fun MqttClient.publishAwait(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): Int
Sends the PUBLISH message to the remote MQTT server
topic
- topic on which the message is published
isDup
- if the message is a duplicate
isRetain
- if the message needs to be retained
publishSentHandler
- handler called after PUBLISH packet sent with packetid (not when QoS 0)
Returncurrent
MQTT client instance *