Gio.NetworkMonitor
const Gio = imports.gi.Gio;
let network_monitor = new Gio.NetworkMonitor({
});
Gio.NetworkMonitor provides an easy-to-use cross-platform API for monitoring network connectivity. On Linux, the implementation is based on the kernel's netlink interface.
Since 2.32
Prerequisites
NetworkMonitor requires Gio.Initable
Known Implementations
None