DefaultNetworkManager

Default implementation of NetworkManager

Default implementation of NetworkManager

Default implementation of NetworkManager

Default implementation of NetworkManager for the JS family (js + wasmJs).

Connectivity is read from navigator.onLine and the online/offline window events. The connection type uses the Network Information API (navigator.connection), which is Chromium-only — where it is unavailable an online connection is reported as NetworkConnectionType.Known.Wifi.

Types

Link copied to clipboard

Builder for creating a DefaultNetworkManager

Properties

Link copied to clipboard
actual open override val network: Flow<NetworkConnectionType>

A Flow of the NetworkConnectionType detected by the network manager

actual open override val network: Flow<NetworkConnectionType>

A Flow of the NetworkConnectionType detected by the network manager

expect open override val network: Flow<NetworkConnectionType>

A Flow of the NetworkConnectionType detected by the network manager

actual open override val network: Flow<NetworkConnectionType>

A Flow of the NetworkConnectionType detected by the network manager

Functions

Link copied to clipboard
actual open suspend override fun startMonitoring()

Starts monitoring for changes to NetworkConnectionType that will be emitted on the network flow

actual open suspend override fun startMonitoring()

Starts monitoring for changes to NetworkConnectionType that will be emitted on the network flow

expect open suspend override fun startMonitoring()

Starts monitoring for changes to NetworkConnectionType that will be emitted on the network flow

actual open suspend override fun startMonitoring()

Starts monitoring for changes to NetworkConnectionType that will be emitted on the network flow

Link copied to clipboard
actual open suspend override fun stopMonitoring()

Stops monitoring for changes to NetworkConnectionType

actual open suspend override fun stopMonitoring()

Stops monitoring for changes to NetworkConnectionType

expect open suspend override fun stopMonitoring()

Stops monitoring for changes to NetworkConnectionType

actual open suspend override fun stopMonitoring()

Stops monitoring for changes to NetworkConnectionType