internet connection

F

Fei

Hi,

I have a question about internet connection. I have my application
running in WindowsXP pro. How can I make my application raise a messagebox
when the internet connection goes down? Please help me out.

Thanks !

Fei
 
T

Try Guy

You would have to Ping your Gateway at an intervall I guess.. and if that
times out you could asume you are not connected anymore!

So you have to find out how to ping.. and then just do that every minute or
so with a Timer.

/Try Guy
 
C

Cablewizard

Since you mention Internet, I'm going to assume you are not talking about your
Network.
You might be able to get away with this pinging the Gateway, maybe not.
Depending upon your network infrastructure, it is entirely possible that your
gateway would be alive and well but not your external connection. So the more
reliable method would be to contact an external server.
However, you might need to know the specifics of the external connection as
well.
Many firewalls and/or routers will not respond to or pass along ICMP Ping
requests.
In addition, over a period of time the firewall might interpret the high volume
of pings to be a pre-cursor to a Denial Of Service attack and might stop
responding to your pings. Worst yet, it might add your IP to a blacklist.

Gerald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Moving Router 2
Zero Upload Speed 6
connection 2
C# Skype silent connection 0
disable mouse 2
Firewall settings 1
Reliance on Internet 12
Configuration system failed to initialize 1

Top