send

abstract fun send(bytes: ByteArray): Result<Unit>(source)

Sends bytes under mode's guarantees.

For DeliveryMode.RELIABLE_ORDERED, Result.success means accepted for reliable delivery - buffered, sequenced, and retransmitted until acked - not "already on the wire".

Return

Result.success once accepted, or the typed failure that prevented it

Parameters

bytes

the raw application payload


open fun send(message: String): Result<Unit>(source)

UTF-8 convenience over send(ByteArray).