Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Am I Connected to the Web - revisited.
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Am I Connected to the Web - revisited.
Divers
Thread ID:
00880123
Message ID:
00880123
Vues:
92
I could still use a little help with this one. I need to know if a workstation is connected to the web, and I am testing code like (which came from a prior thread a few months back):
LPARAMETERS lcWebAddress
* Notice the site we are looking with lcWebAddress is passed in format of: "http://www.yahoo.com"

DECLARE INTEGER InternetCheckConnection IN Wininet.DLL STRING Url, LONG dwFlags, LONG Reserved

IF InternetCheckConnection(lcWebAddress, 1, 0) != 0
    * Yes, we are connected as we were able to find a site.
    	RETURN .T.
ELSE
	RETURN .F.
ENDIF
What I have found is this: the above works very fast if:
1- I have a connection to the web.
2- I never had a connection to the web.
2- I have a connection to the web, but unplug the Ethernet cable from the back of the computer.

However, in testing if I unplug like the Cable modem cable that goes to the router, then its extremely slow - to the point that some users would probably think the application has halted. I am thinking this is what the user might experience when thier Cable or DSL modem goes down.

Any suggestions on how to better deal with this? I am thinking I might need to just buy West-Wind's wwHTTP::HTTPPing class - but not positive that is the final solution.

Mel Cummings
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform