Type Boolean Library network.* Revision Release 2022.3683 Keywords network status, reachability, canDetectNetworkStatusChanges See also network.setStatusListener() networkStatus
Returns true
if network reachability events are supported on the current platform.
network.canDetectNetworkStatusChanges
Network reachability (networkStatus) events are only supported on macOS and iOS.
local function networkListener( event ) print( "Network event" ) end if ( network.canDetectNetworkStatusChanges ) then network.setStatusListener( "www.solar2d.com", networkListener ) else print( "Network reachability not supported on this platform." ) end