Detect internet reachable

This is a discussion on Detect internet reachable within the Linux Programming forums, part of the Platform Specific Boards category; HI All, Is there anybody have an idea of how to detect internet is reachable ? At present , I'm ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    1

    Talking Detect internet reachable

    HI All,

    Is there anybody have an idea of how to detect internet is reachable ?
    At present , I'm using ping to detect internet is reachable , but it's maybe a bad idea , some firewall of router may block ping requesting.

    Best Regards,
    Ke Tao
    Last edited by kotao_78; 07-17-2007 at 09:00 PM. Reason: Changing notification

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,443
    Unless you actually try to connect to the server you want to connect to, using the associated port for the protocol you want to use (say www.google.com:80), then there is always the possibility that your "test" will fail because of some bizarre firewall rule, and the thing you really want to do will succeed.

    Likewise, your test may pass, yet the actual server you want to talk to may be offline.

    Querying your ISP's DNS server is probably one way to establish if you can get around in general.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Internet Problems
    By SirCrono6 in forum Tech Board
    Replies: 3
    Last Post: 04-26-2004, 09:47 PM
  2. Replies: 5
    Last Post: 11-20-2003, 12:27 AM
  3. XP Internet problems
    By Hunter2 in forum Tech Board
    Replies: 9
    Last Post: 09-18-2003, 08:56 PM
  4. Internet Publishing Laws
    By novacain in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 12-09-2002, 01:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21