• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Am connected to Internet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Am connected to Internet?


  • Subject: Re: Am connected to Internet?
  • From: Quinn <email@hidden>
  • Date: Mon, 11 Feb 2002 15:27:00 +0000

At 9:50 -0500 11/2/02, John Cebasek wrote:
Could someone point me to some documentation or source that answers the
simple question of "Am I connected to the internet?" in a way that'll work
on Mac OS 9 and Mac OS X? I've been searching the archives and couldn't see
anything.

This has been discussed on this list a lot, to the point where there's a document describing the various issues involved.

<http://developer.apple.com/technotes/tn/tn1145.html>

However, the question really isn't simple. Different people define "connected to the Internet" as different things. For example, right now I'm VPN'd (a NATing VPN no less) into Apple's corporate network which is in turn connected to the Internet via a Firewall. However, the firewall's rules are very liberal, so as far as most TCP client applications are concerned, I'm connected to the Internet. However, if your software was UDP-based it wouldn't work because UDP responses are blocked by both Apple's firewall and the VPN NAT.

I suspect you really want to know "Can I contact this IP address with this protocol?" and "Can I do this without dialling the user's modem?" If that's the case then TN 1145 covers the issue completely on Mac OS 9. On Mac OS X the System Configuration framework provides APIs (SCNetworkCheckReachabilityByName, SCNetworkCheckReachabilityByAddress) specifically to do this (requires 10.1 and above).

If this doesn't help, please write back with more details.

And yes, I know I should update TN 1145 for Mac OS X. One day, one day, ...

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Am connected to Internet? (From: John Cebasek <email@hidden>)

  • Prev by Date: Am connected to Internet?
  • Next by Date: Am I Connected (Cont)
  • Previous by thread: Am connected to Internet?
  • Next by thread: Am I Connected (Cont)
  • Index(es):
    • Date
    • Thread