NetworkMonitor
Observes device connectivity via ConnectivityManager. The Kotlin counterpart of SwiftyNetwork's NetworkMonitor (which wraps NWPathMonitor).
status is NetworkReachability.UNKNOWN until start is called. updates is a hot StateFlow that replays the current value to new collectors and then emits changes — the Kotlin analog of SwiftyNetwork's AsyncStream.
Properties
Functions
Link copied to clipboard
Adapts this monitor to a ReachabilityGate for NetworkClientConfiguration.reachabilityGate.
Link copied to clipboard
Suspends until status becomes NetworkReachability.REACHABLE, returning immediately if it already is. Requires start to have been called; otherwise the status stays NetworkReachability.UNKNOWN and this never resumes — bound it with withTimeout for standalone use (the retry path already does).