• 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: Monitoring host reachability and the SCNetwork API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monitoring host reachability and the SCNetwork API


  • Subject: Re: Monitoring host reachability and the SCNetwork API
  • From: "Jeremy W. Sherman" <email@hidden>
  • Date: Thu, 16 Apr 2009 15:09:26 -0400

Hi Jeff,

You are correct that I misinterpreted the results of my test. This was
confounded by my running a stale version of the runloop-based code
(I'm fighting launchd's KeepAlive), which did correctly test for
reachability all along, but previously supplied the hostname in the
wrong format (with prefixed http://, which it does not want). Now that
I've unloaded and reloaded the executable, it is correctly determining
reachability.

My thanks to all who helped me, and apologies to all readers for
unnecessarily troubling you.

—Jeremy

On Thu, Apr 16, 2009 at 2:25 PM, Jeff Johnson
<email@hidden> wrote:
> On Apr 16, 2009, at 1:02 PM, Jeremy W. Sherman wrote:
>
>> I am connected to the Internet. But checking reachability of
>> google.com via SCNetworkCheckReachabilityByName("google.com", &flags)
>> yields flags of 0x0002, kSCNetworkConnectionRequired. The results of
>> using an SCNetworkReachability installed on the runloop agree: a
>> connection is required, and cannot be automatically established.
>
> Are you sure you're interpreting those flags correctly?
>
>        kSCNetworkFlagsTransientConnection      = 1<<0,
>        kSCNetworkFlagsReachable                = 1<<1,
>        kSCNetworkFlagsConnectionRequired       = 1<<2,
>
> -Jeff
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Monitoring host reachability and the SCNetwork API (From: "Jeremy W. Sherman" <email@hidden>)
 >Re: Monitoring host reachability and the SCNetwork API (From: Jeff Johnson <email@hidden>)

  • Prev by Date: Re: Monitoring host reachability and the SCNetwork API
  • Next by Date: Server name
  • Previous by thread: Re: Monitoring host reachability and the SCNetwork API
  • Next by thread: Server name
  • Index(es):
    • Date
    • Thread