any way to detect condition "connected to ISP but not internet"?

Alex Tweedly alex at tweedly.net
Tue Jan 20 18:42:45 EST 2009


Andre Garzia wrote:
> easiest thing is to ping your own server. Try to load a simple text
> file from your server, if it doesn't load, then, you're not connected.
> For all that matters, this is a good test and easy to implement.
>
>   
I suspect that this simple test will run into the same problem as the 
browser does - hanging (apparently) forever. I suspect that the problem 
arises from DNS (which can produce unreasonable timeouts if there is 
incomplete connectivity). It might be interesting, while the problem 
exists, to try (from a terminal window) pinging a server first by IP 
address, then by its name to confirm this. (and of course, you need to 
know the IP address *before* the problem occurs :-)

In fact, if this problem, whatever it is, exists when you try it, the 
only solution will be to be completely asynchronous from the initial 
test - I'd try creating a small standalone which downloads a file as 
Andre suggested, and have your real app run ithat standalone through a 
backgrounded shell command, and test within your app whether the file on 
disk gets updated within your timeout limit. Even if the shell command 
hangs indefinitely, yor app will be OK.

-- Alex.
> On Tue, Jan 20, 2009 at 1:11 AM, Josh Mellicker <josh at dvcreators.net> wrote:
>   
>> I just thought I'd ask the many networking gurus here:
>>
>> It seems easy with Revolution to check if connected to the internet, if not
>> connected, after a timeOutInterval, an error is returned and it can be dealt
>> with, no problem.
>>
>> However...
>>
>> Here at our office, we got Time Warner cable internet a few months ago, and
>> while it is speedy (20 mbits d/l!) every few weeks we encounter a strange
>> and perhaps rare situation where:
>>
>> 1. we are connected to our ISP
>>
>> 2. but our ISP is not connected to the internet
>>
>>
>> On OS X, network diagnostics show:
>>
>> Ethernet = green
>> Network Settings = green
>> ISP = green
>> Internet = red
>> Server = red
>>
>> When we encounter this "false connection" condition, a browser, rather than
>> saying "cannot get web page because we're offline" will hang forever.
>>
>>
>> The danger here that we should all be aware of, is that if you sell an app
>> that, for example, checks for updates upon launch, if your customer has this
>> weird connectivity situation, your app will freeze and the customer is
>> unable to get past this and use the app they legitimately paid you for.
>>
>> Even if the connectivity problem is rare, this is a situation we want to
>> avoid at any cost, so we have no automatic connection routines. If they
>> initiate a network operation, and the app hangs, they can force quit and
>> launch again, and not do that anymore now that they know better :-)
>>
>>
>> So, I wondered if any of you had any experience, workarounds or ideas for
>> detecting this "false connection" condition.
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>     
>
>
>
>   




More information about the use-livecode mailing list