Fast way to check for internet Connection?

ryodoan

Well-known member
Joined
Jul 16, 2004
Messages
65
Location
Ohio
Programming Experience
3-5
Hey, I need a fast, accurate way to check for an internet connection, here are some things I have tried.

  1. My.Computer.Network.IsAvailable()
    • Pros: Its super Fast
    • Cons:
      • Only tells you if you are connected to a network
      • Gives a false positive when you are still connecting to a network (a problem with bad wireless connections)
  2. Try to contact a website with a System.Net.webrequest
    • Pros: It works great when you actually have an internet connection (0.14 seconds)
    • Cons: When you dont have an internet connection it is slow (2.34 seconds)
So, any other suggestions? Thanks in advance for any input.
 
Top Bottom