actuate

open fun actuate(onMessage: (message: String) -> Unit): Result<Unit>(source)

Binds onMessage as the text handler for inbound traffic on this channel: each message decoded as UTF-8 and .trim()ed, matching Connection.actuate's long-standing semantics exactly. For a binary or whitespace-significant payload use actuateBytes.

Return

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

Parameters

onMessage

callback invoked with the decoded, trimmed text of each message