actuateBytes

abstract fun actuateBytes(onMessage: (bytes: ByteArray) -> Unit): Result<Unit>(source)

Binds onMessage as the raw-bytes handler for inbound traffic on this channel: an exact-length, undecoded, untrimmed copy of each message. Per-mode: binding a reliable handler does not disturb the unreliable one, and vice versa.

Return

Result.success once the handler is registered, or the failure that prevented it

Parameters

onMessage

callback invoked with an exact-length copy of each message