Andre, The topic of internet connection detection is a long one and so far, we don't have an superb solution yet. The piece of code you put on your email might not be ideal for some reasons, first it is blocking and might hang the software for a while. The main issue being that you might be connected to a local area network but not the internet, so until the dns thing fail and all cascade from there, your software will be lost.
I think the best way to test would be to open a socket connection to a known ip at port 80, this will fail faster than get URL if I recall correctly. I can't search the archives right now but there were lenghty talks about this some time ago. Cheers andre On Fri, Jan 15, 2010 at 6:20 AM, Andre Rombauts <[email protected]> wrote: > Hello everyone! > > I have made a deep search on RevTalk solutions for checking the Internet > availability before executing an application requiring it. > > There is often a rather long delay for returning the result when the > computer is not connected, unless the test is made ith IP addresses instead > of domain names. Thus, I tried a way using IP from well-known websites such > as Google, Yahoo, Apple, CNN, UN. The result is sent in 4-6 seconds. The > best method, as I could test, is to use get url. > > But I'm wondering if these IP are constant in time... The solution, to me, > is to use a series of 5 sites. If 1 is OK, then link exists... > > What do you think about this solution? > > get url "http://157.166.226.27" > if it is empty then > put false into varConnected > else > put true into varConnected > end if > > André Rombauts, > Fléron (Liege), Belgium > Using Revolution Enterprise 4.5 build 1000 > on OS X 10.6 > > > _______________________________________________ > use-revolution mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > -- http://www.andregarzia.com All We Do Is Code. _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
