get_connectivity


Description:

[ Version ( since = "2.44" ) ]
public NetworkConnectivity get_connectivity ()

Gets a more detailed networking state than get_network_available.

If network_available is false, then the connectivity state will be g_network_connectivity_local.

If network_available is true, then the connectivity state will be g_network_connectivity_full (if there is full Internet connectivity), g_network_connectivity_limited (if the host has a default route, but appears to be unable to actually reach the full Internet), or g_network_connectivity_portal (if the host is trapped behind a "captive portal" that requires some sort of login or acknowledgement before allowing full Internet access).

Note that in the case of g_network_connectivity_limited and g_network_connectivity_portal, it is possible that some sites are reachable but others are not. In this case, applications can attempt to connect to remote servers, but should gracefully fall back to their "offline" behavior if the connection attempt fails.

Parameters:

this

the NetworkMonitor

Returns:

the network connectivity state