libnick 2024.7.2
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::Network::NetworkMonitor Class Reference

A monitor of the system's network connection. More...

#include <networkmonitor.h>

Public Member Functions

 NetworkMonitor ()
 Constructs a NetworkMonitor. This method will call checkConnectionState() to get the initial system network state.
 
 ~NetworkMonitor ()
 Destructs a NetworkMonitor.
 
Events::Event< NetworkStateChangedEventArgs > & stateChanged ()
 Gets the StateChanged event. This event is invoked whenever the state of the network connection changes.
 
NetworkState getConnectionState () const
 Gets the state of the network connection.
 

Detailed Description

A monitor of the system's network connection.

Constructor & Destructor Documentation

◆ NetworkMonitor()

Nickvision::Network::NetworkMonitor::NetworkMonitor ( )

Constructs a NetworkMonitor. This method will call checkConnectionState() to get the initial system network state.

Exceptions
std::runtime_errorThrown if unable to create the NetworkMonitor

◆ ~NetworkMonitor()

Nickvision::Network::NetworkMonitor::~NetworkMonitor ( )

Destructs a NetworkMonitor.

Member Function Documentation

◆ getConnectionState()

NetworkState Nickvision::Network::NetworkMonitor::getConnectionState ( ) const

Gets the state of the network connection.

Returns
NetworkState

◆ stateChanged()

Events::Event< NetworkStateChangedEventArgs > & Nickvision::Network::NetworkMonitor::stateChanged ( )

Gets the StateChanged event. This event is invoked whenever the state of the network connection changes.

Returns
The StateChanged event

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