testing for Internet connection
chipp at chipp.com
Sun Dec 19 14:01:36 CST 2004
You are correct in that if Dns is down then my function will return
false, exactly how I wish it to work.
All my apps connect to domains, not IPaddresses, so a positive
connecting to an IPaddress wouldn't explain to my users why they cannot
connect to a domain.
Perhaps a combination ping then get url may suffice. I've over 10 apps
testing with google, with no problems so far. I imagine google can
withstand a dos better than my servers.
On Sun, 19 Dec 2004 6:15 am, Alex Tweedly wrote:
which can be avoided by using numeric IP addresses rather than host
names. Using a host name will cause the Rev app to block for 10-30
seconds while it waits for a DNS response (see BZ 2117 for details -
Mark W.'s solution is a non-blocking ping)
> This problem happens to me all the time, because I use my laptop
> connected to an ethernet which connects to the internet through another
> computer using a dial-up line, and the dial-up is often disconnected.
> Laptop thinks it has a connection (the ethernet is up) and thinks it
> has DNS servers it can reach (because the main computer acts as a DNS
> proxy) - but when it queries a host name, it is blocked until the DNS
> response times out.
>> if your user is not connected, they will probably get an 'invalid host'
>> answer. Testing against google seems always to work for me. I figure,
>> they can't get to google, then they can't get to my server.
> Google has been the target of a number of DoS attacks, so there have
> been at least two occasions when large parts of the net couldn't get an
> answer from Google, but could have done from you.
> -- Alex.
More information about the use-livecode