ConnectionStateProvider

Read-only provider of the canonical app-level connection state.

Inject this interface in ViewModels and feature modules that only need to observe connection state — never write it. This enforces the single-writer contract (only MeshConnectionManager may mutate state via ServiceRepository.setConnectionState).

See also

for the full read/write interface

Inheritors

Properties

Link copied to clipboard
abstract val connectionEpochs: StateFlow<ConnectionEpochs>

Convenience view of monotonic departures and completed handshakes. Use connectionLifecycle when the counters must be correlated with a specific state, because independent StateFlow collections can observe different versions.

Link copied to clipboard
abstract val connectionLifecycle: StateFlow<ConnectionLifecycle>

Atomically correlated canonical state and lifecycle evidence.

Link copied to clipboard
abstract val connectionState: StateFlow<ConnectionState>

Canonical app-level connection state.