ReturnDevice

interface ReturnDevice

One device in a ReturnHarness: a key that outlives its processes, and the link of the process running now.

What the rows prove with it, and what they cannot. Every hook here acts on the fabric, never on a room: none takes a Room or calls one. So a return the rows observe was driven by the room's own reconnect, or by the one join a relaunched process makes; the rows count their own calls on the handles they hold. They cannot see a hook that keeps a room of its own and drives the return through it — a harness written to cheat. heals is the counterweight: it counts the re-weaves the device's rooms made themselves, so a row can assert its drop was answered by the room's own reconnect.

Inheritors

Properties

Link copied to clipboard
abstract val heals: Int

How many times this device's rooms healed their seam in place through their own re-weave.

Functions

Link copied to clipboard
abstract suspend fun drop()

Tear the running process's link. Its room reads the tear and starts its own reconnect; every re-weave it attempts fails until restore.

Link copied to clipboard
abstract suspend fun impostor(): RoomFactory

A factory for a different device — a key of its own — whose rooms present this device's peer id.

Link copied to clipboard
abstract suspend fun kill(socketCloses: Boolean = true)

End the running process without a goodbye, as an operating system kills an app: its rooms send nothing more.

Link copied to clipboard
abstract suspend fun launch(reusePeerId: Boolean = false): RoomFactory

Start a process on this device and return its factory. Rooms the factory makes prove this device's key.

Link copied to clipboard
abstract suspend fun launchBeside(): RoomFactory

Start a second process on this device while the one launch started is still running — a second tab over the same key store — and return its factory. Rooms it makes prove this device's key under a fresh peer id of their own, so the host meets a known key under a new id with every seat of that key still connected (Decided 30).

Link copied to clipboard
abstract suspend fun restore()

Let this device's link come back: the room's next re-weave heals the same seam, under the same peer id.