checking for Internet connection

Ken Ray kray at sonsothunder.com
Sun Sep 29 14:49:01 EDT 2002


Also note that MC checks for this when it launches, and not again
afterwards. So if you have a good internet connection (i.e.
hostnametoaddres("localhost") works) and then unplug, it still works.
Similarly, if you start disconnected and get an error from
hostnametoaddress("localhost") you will still get an error even after the
connection is established. You need to quit MC and relaunch it for it to
"recognize" that the internet socket is open.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "andu" <undo at cloud9.net>
To: <metacard at lists.runrev.com>
Sent: Sunday, September 29, 2002 12:21 PM
Subject: Re: checking for Internet connection


>
>
> --On Saturday, September 28, 2002 11:19:09 -0700 Richard Gaskin
> <ambassador at fourthworld.com> wrote:
>
> > How do you tell if an Internet connection is availble without typing up
> > the user's machine?
>
> On Mac classic if you do [put hostnametoaddress("localhost"]) with no
> internet connection you get an error regarding internet services (DNS).
> With internet connection active you get a "invalid host address" error for
> localhost (and any name which is not resolved). I assume this is multi
> platform so you can use the former for your purposes.
>
> >
> > I had thought I might just set the socketTimeoutInterval to something
like
> > 10 seconds and then just try to get a URL, but no matter what I set the
> > socketTimeoutInterval to, when there's no Internet connection it takes
> > about two minutes for urlLib to report an error.
> >
> > Any suggestions?
> >
> > --
> >  Richard Gaskin
> >  Fourth World Media Corporation
> >  Custom Software and Web Development for All Major Platforms
> >  Developer of WebMerge 2.0: Publish any database on any site
> >  ___________________________________________________________
> >  Ambassador at FourthWorld.com       http://www.FourthWorld.com
> >  Tel: 323-225-3717                       AIM: FourthWorldInc
> >
> > _______________________________________________
> > metacard mailing list
> > metacard at lists.runrev.com
> > http://lists.runrev.com/mailman/listinfo/metacard
> >
>
>
>
> Regards, Andu Novac
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>




More information about the metacard mailing list