|
-
Jan 4th, 2008, 04:57 PM
#1
Thread Starter
Addicted Member
[2008] Connected to Internet?
How can I check if Im connected to the internet?
(I may be connected through a modem, LAN, wireless...)
thanks
-
Jan 4th, 2008, 05:12 PM
#2
Frenzied Member
Re: [2008] Connected to Internet?
Try pinging a site like google.
http://msdn2.microsoft.com/en-us/lib...tion.ping.aspx
Also, a lot of other topics have been made recently asking this. You can also view those for related solutions.
-
Jan 4th, 2008, 05:12 PM
#3
Re: [2008] Connected to Internet?
You attempt to connect to a remote server. A response of "no route to host / host unreachable" usuallysignifies no connection. The System.Net.Sockets namespace contains all you need.
Why do you want to determine weather there is an Internet connection? If you are going to attempt to make a connection to a remote service it is best to do it all in one go.
-
Jan 5th, 2008, 06:18 AM
#4
Re: [2008] Connected to Internet?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jan 5th, 2008, 06:24 AM
#5
Re: [2008] Connected to Internet?
I have never been one to recommend pinging a site like google to check for a connection. Simply because; if the application is installed on 500 machines (i.e: easily possible in a corporate environment). The requests would soon get blocked when all of them attempt to ping at once.
Create you own server if you want to do this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|