Skip to main content

## Module network

Source
Expand description

Network transport classification for the WiFi-only download gate.

This answers “what kind of connection are we on?”, which is orthogonal to the `ConnectivityMonitor`’s “is the server reachable?”. The download queue pump consults this before starting pending rows when the user has enabled WiFi-only downloads.

On Android the real transport is read from `NetworkCapabilities` in `NetworkTypeMonitor.kt` and pushed in from the frontend. On desktop there is no metered-connection concept worth enforcing, so we report `Ethernet`, which is always acceptable — gating desktop downloads would be a regression.

## Structs§

NetworkState
  Current network transport plus whether it is metered.
NetworkStateHandle
  Shared, mutable view of the current network transport.

## Enums§

NetworkType
  Kind of network transport currently active.