DefaultJoinerReconnectController
Default implementation of JoinerReconnectController.
Each disconnected peer gets an independent coroutine timer. The timer uses delay so kotlinx.coroutines.test.runTest's virtual time governs expiry — no wall-clock dependency.
Per-peer windows are independent: one peer's window expiring does not affect another peer's window.
Parameters
The Room this controller guards. Tokens for a different Room are rejected as ResumeResult.TokenInvalid.
Duration of the reconnect window in millis. Defaults to DEFAULT_RECONNECT_WINDOW_MS (60 s).
Injected clock returning epoch-millis. Must never be wired to System.currentTimeMillis() from commonMain production code; the JVM wiring layer (your dependency injection container) passes { System.currentTimeMillis() }. Tests pass a fixed or advancing value so no wall-clock coupling escapes.
Coroutine scope that owns per-peer timer jobs. Must outlive this controller; typically the Room's scope.
Properties
Live stream of window lifecycle events: JoinerReconnectEvent.WindowOpened, JoinerReconnectEvent.Resumed, JoinerReconnectEvent.WindowExpired.