function cdb_checkInternetStatus()


Summary

This function will check whether the client is connected to the internet, and set a global variable for the network status. It will attempt to connect to https://caneladb.com. * If the domain can be successfully reached, the internet status will be set to true. * If this domain is unreachable, the internet status will be set to false.

Inputs

None

Outputs

(Boolean) - True if the internet is available, false if the internet is unreachable.

Examples

# While Online

put cdb_checkInternetStatus()

# Outputs "true"
# gCSInetworkstatusA["status"] will be set to true
# Network calls (i.e., cloud calls) will be attempted and will respond normally

# While Offline (Internet unplugged, no service on mobile, etc.)

put cdb_checkInternetStatus()

# Outputs "false"
# gCSInetworkstatusA["status"] will be set to false
# Network calls (i.e., cloud calls) will not return cloud data.
# Cloud writes will be cached until the internet is available again.