module Gio::NetworkMonitor

Overview

#GNetworkMonitor provides an easy-to-use cross-platform API for monitoring network connectivity. On Linux, the available implementations are based on the kernel's netlink interface and on NetworkManager.

There is also an implementation for use inside Flatpak sandboxes.

Defined in:

lib/gi-crystal/src/auto/gio-2.0/network_monitor.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.cast(obj : GObject::Object) : self #

Cast a GObject::Object to self, throws a TypeCastError if the cast can't be made.


[View source]

Class Method Detail

def self.cast?(obj : GObject::Object) : self | Nil #

[View source]
def self.default : Gio::NetworkMonitor #

[View source]
def self.g_type : UInt64 #

[View source]

Instance Method Detail

def can_reach(connectable : Gio::SocketConnectable, cancellable : Gio::Cancellable | Nil) : Bool #

[View source]
def can_reach_async(connectable : Gio::SocketConnectable, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def can_reach_finish(result : Gio::AsyncResult) : Bool #

[View source]
def connectivity : Gio::NetworkConnectivity #

[View source]
def network_available : Bool #

[View source]
def network_available? : Bool #

[View source]
def network_changed_signal #

[View source]
def network_metered : Bool #

[View source]
def network_metered? : Bool #

[View source]
abstract def to_unsafe #

[View source]