startReliable

fun startReliable(onClientMessage: (ByteArray) -> Unit): Result<Unit>(source)

Binds onClientMessage as the reliable-ordered handler on every currently-registered connection, opening (or reusing) each connection's reliable channel as needed. Unlike start / startBytes, every connection is attempted even if an earlier one failed - a single peer's full in-flight window is routine and must not stop the rest from being bound; only the reported Result short-circuits to the first failure.

Return

Result.success if every connection was actuated, or the first failure

Parameters

onClientMessage

callback invoked with the exact-length payload of every reliable message a connection receives, once, in send order; it runs on the single-threaded dispatch executor, not the caller's thread