Emitted when the network configuration changes. If available is TRUE, then some hosts may be reachable that were not reachable before, while others that were reachable before may no longer be reachable. If available is FALSE, then no remote hosts are reachable. Since 2.32
Attempts to determine whether or not the host pointed to by connectable can be reached, without actually trying to connect to it. This may return TRUE even when "network-available" is FALSE, if, for example, monitor can determine that connectable refers to a host on a local network. If monitor believes that an attempt to connect to connectable will succeed, it will return TRUE. Otherwise, it will return FALSE and set error to an appropriate error (such as G_IO_ERROR_HOST_UNREACHABLE). Note that although this does not attempt to connect to connectable, it may still block for a brief period of time (eg, trying to do multicast DNS on the local network), so if you do not want to block, you should use g_network_monitor_can_reach_async(). Since 2.32
Asynchronously attempts to determine whether or not the host pointed to by connectable can be reached, without actually trying to connect to it. For more details, see g_network_monitor_can_reach(). When the operation is finished, callback will be called. You can then call g_network_monitor_can_reach_finish() to get the result of the operation.
Finishes an async network connectivity test. See g_network_monitor_can_reach_async().
Checks if the network is available. "Available" here means that the system has a default route available for at least one of IPv4 or IPv6. It does not necessarily imply that the public Internet is reachable. See "network-available" for more details. Since 2.32
the main Gtk struct as a void*
Gets the default GNetworkMonitor for the system. Since 2.32
GNetworkMonitor provides an easy-to-use cross-platform API for monitoring network connectivity. On Linux, the implementation is based on the kernel's netlink interface.