morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::offline::NetworkMonitorConfig Struct Reference

Configuration for NetworkMonitor. More...

#include <network_monitor.hpp>

Public Attributes

std::chrono::milliseconds probeInterval = std::chrono::seconds{5}
 Time between probe calls.
int failureThreshold = 3
 Consecutive failures required before going offline.
int onlineThreshold = 1
 Consecutive successes required before going online.

Detailed Description

Configuration for NetworkMonitor.

Declared outside NetworkMonitor so that its default member initialisers are fully parsed before any constructor default argument that names Config{} is evaluated. Compilers (clang, GCC) reject Config cfg = Config{} in a constructor default argument when Config is an incomplete nested type.

Definition at line 23 of file network_monitor.hpp.

Member Data Documentation

◆ probeInterval

std::chrono::milliseconds morph::offline::NetworkMonitorConfig::probeInterval = std::chrono::seconds{5}

Time between probe calls.

Definition at line 25 of file network_monitor.hpp.

◆ failureThreshold

int morph::offline::NetworkMonitorConfig::failureThreshold = 3

Consecutive failures required before going offline.

Definition at line 28 of file network_monitor.hpp.

◆ onlineThreshold

int morph::offline::NetworkMonitorConfig::onlineThreshold = 1

Consecutive successes required before going online.

Definition at line 31 of file network_monitor.hpp.


The documentation for this struct was generated from the following file: