ProbeStrategy

sealed interface ProbeStrategy(source)

How the desktop monitor checks reachability.

Inheritors

Types

Link copied to clipboard
class Custom(val check: suspend () -> Boolean) : ProbeStrategy

Your own check; return true when the internet is reachable. Runs on an IO thread.

Link copied to clipboard
data object Dns : ProbeStrategy

DNS resolution of DnsProbeConfig.hostname only. Cheapest, but OS caches can answer while offline.

Link copied to clipboard
data object HintsOnly : ProbeStrategy

Zero traffic and no schedule: only io.github.lexmerciful.connectivity.ConnectivityMonitor hints change the state.

Link copied to clipboard
data object Http : ProbeStrategy

HTTP request to HttpProbeConfig.url. Works behind HTTP-only proxies and can detect captive portals.

Link copied to clipboard

Zero traffic: the interface check only. Virtual adapters can keep it "online" while offline.

Link copied to clipboard
data object Tcp : ProbeStrategy

Default. TCP handshake to TcpProbeConfig.targets; no payload is sent.