How to check if user is online (connected to internet)?

  • Thread starter Thread starter Martin Ho
  • Start date Start date
M

Martin Ho

My application (before is actually fully loads) should check if user
is connected to internet.
Is there any way to check this with certainty?
Thanks a lot.

Martin
 
One way would be to try to download some file off the internet...but
if that website would be inaccessible at the moment my application
would be wrong...
any ideas guys?
martin
 
Do you mean connected through a dial up connection or through a LAN etc?

If you want to see if a dial up connection is active, I'm sure there must be
something to enumerate the list of active connections (like the way task
manager does it in Windows XP). Not sure what though.

I suspect detecting if you are connected through a lan would be harder as
you don't know if the lan is actually connected to the internet.

Your idea about downloading a file isn't great if you just want to know if
they are connected to the net for the reason you mentioned. A better way
would be to assume you are online and try and do what you want to do and
catch any errors that result.

Sorry I can't be of more use.

Trev.

Martin Ho said:
One way would be to try to download some file off the internet...but
if that website would be inaccessible at the moment my application
would be wrong...
any ideas guys?
martin



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
What I could do is to try to establish the connection to 10 websites
and if all 10 is not accessible I know there is no connection.... if
at least one is accessible that will give me also some answer...
 
Back
Top