KtorMeshClientLoom
constructor(httpClient: HttpClient, dispatcher: CoroutineDispatcher = Dispatchers.Default, selfPeerId: PeerId = PeerId(Uuid.random().toString()), random: Random = Random.Default, policy: DeliveryPolicy = DeliveryPolicy.Reliable)
Parameters
dispatcher
Scheduler for the mesh spoke's per-link read loop; passed directly to peerMesh (which guards its own state with primitives — the dispatcher is scheduling-only, never a serialization crutch). Production default is Dispatchers.Default; tests inject a dispatcher derived from the test scheduler.
selfPeerId
The fabric identity this loom presents on every join. Defaults to a random UUID minted once at construction; supply a deterministic value for stable identity across reconnects.
random
Source of the per-connection mesh nonce. Production defaults to Random.Default; tests pass a seeded Random so the dedup tiebreak is deterministic.
policy
Delivery policy for the spoke seam's inbound spool. Defaults to DeliveryPolicy.Reliable.