bobsneidar at iotecdigital.com
Fri Mar 2 16:47:30 CET 2018
Whether or not you are connected to the internet isn't really the issue, is it? All that means is that you have a route to the WAN port of your edge router. I mean, the real issue is finding out if you can reach a particular server on a particular port using DNS, or else a given IP address, whether or not it is "on the internet". That is I think, what you really mean.
The code I posted, while it has some exterraneous code dependent on sqlYoga calls, neverless is a framework for doing that.
1. Outer loop to allow user to retry (not strictly necessary but it lets the user attempt to fix the problem before dumping him).
2. Inner loop to open socket to prescribed server (Not necessary either, but you may want to check multiple times for the open socket in case of slow connections, and timeout after x tries).
> On Mar 2, 2018, at 03:44 , Graham Samuel via use-livecode <use-livecode at lists.runrev.com> wrote:
> I’m really surprised there isn’t a foolproof way to find out if one’s device is connected to the internet or not.
More information about the use-livecode