How do i check for an internet connection?
Andre Garzia
soapdog at mac.com
Tue Dec 6 21:09:45 EST 2005
Kurt,
that's a little gem... nice, never thought of that, I did things like
get URL "http://www.soapdog.org/checknet.txt" and trapped for errors,
of course this code breaks if my domain goes offline, but that code
of yours, that holds!
Cheers
andre
On Dec 7, 2005, at 12:06 AM, Kurt Kaufman wrote:
> 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
> _______________________________________________
> 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