Is there a way to test whether (for desktop Mathematica) in the middle of a calculation whether there is internet connectivity?
The reason is that, if there is no internet connectivity (e.g., WIFI is turned off for the computer) then for my particular application will make use of cached material, but if there is connectivity then I will access the Wolfram knowledge-base.
There is the parameter $AllowInternet
which determines whether accessing the internet is permitted, but this is different from determining if the internet is there to use.