Checking if internet is connected using tsNet?

Klaus major-k klaus at major-k.de
Fri Jul 27 19:56:39 CEST 2018


Hi Richard,

> Am 27.07.2018 um 19:53 schrieb Richard Gaskin via use-livecode <use-livecode at lists.runrev.com>:
> 
> Klaus wrote:
> >> Define "valid"...
> >
> > Sorry, I meant if the machine is currently connected to the internet.
> > And if an URL actually does exist = "valid".
> Assuming the protocol in question is HTTP/S,

yes.

> a request to a non-existent resource should return "404" in the error string provided in "the result".  
> If "the result" is empty the resource was retrieved as expected.

I treid with a non-existing url and got:
tsneterr: (6) Could not resolve host: www.ghghgtztztuoouummmb.com

No 404, but it is OK for me!

> -- 
> Richard Gaskin

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de




More information about the use-livecode mailing list