clientSeam

suspend fun clientSeam(peerId: PeerId, random: Random, principal: Principal? = null): Seam

A raw, multi-channel client Seam wired to serverLoom over one fresh in-memory connection.

Wrap in a NamedMux and select a channel per room name to participate in several rooms over the single link. The server registers this connection into a room when its first frame arrives on that room's channel.

Parameters

peerId

this client's identity.

random

seeded Random for this client's mesh-seam nonce generation — pass a distinct seed per client so nonces differ deterministically.

principal

optional host-verified Principal to attest onto this connection's server-end (as a real fabric's accept handler would via Connection.withPrincipal). The server reads it back at admit time, keyed by this client's peerId. Defaults to null (an unattested connection).