cancel

fun cancel()

Cancels sending the message.

Only segmented and acknowledged messages can be cancelled. Unsegmented unacknowledged messages are sent instantaneously (depending on the connection interval and message size) and therefore cannot be cancelled.