Re: How detect internet connection?
- Posted by sergelli Aug 13, 2013
- 1706 views
useless_ said...
Sure:
dns google.com. (your isp or computer may cache this tho)
http to google. (or anywhere else)
useless
When I try to do a "get dns google.com", the program stops responding for several seconds (if no internet). By using the http, this delay also happens.
This delay, I would like to avoid.
For this, I need a solely function to detect whether the internet is available
So, I would make a program ....
if hasInternet () then getDNS (MyISP) else - Do nothing end if
... and avoid the delay that I do not wish