How do i check for an internet connection?
Kurt Kaufman
kkaufman at snet.net
Tue Dec 6 21:06:28 EST 2005
I don't remember who to thank for this one, which I modified only
slightly:
on testForConnection
put "255.255.255.255:43222" into testSocket
open datagram socket to testSocket
put hostAddress(testSocket) into theIPAddress
close socket testSocket
if theIPAddress is "127.0.0.1" then
--it's the local machine address, so not connected
--may insert connection routine here
end testForConnection
-Kurt
More information about the use-livecode
mailing list