Talk About Network

Google





Mac > Mac Programmer Help > Re: Small probl...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 3693 of 3889
Post > Topic >>

Re: Small problem with SCNetworkCheckReachabilityByName

by Gregory Weston <uce@[EMAIL PROTECTED] > Apr 4, 2008 at 01:41 PM

In article <slrnfvc2ll.9p7.jim@[EMAIL PROTECTED]
>,
 Jim <jim@[EMAIL PROTECTED]
> wrote:

> I'm trying to get my head around the very basics of the reachability API
(as
> suggested elsewhere). I found a wee bit of example code that I'm trying
to
> get working, but I'm having problems.
> 
> The code is essentially this:
> 
> #im****t "reachObject.h"
> #im****t <CoreFoundation/CoreFoundation.h>
> #im****t <SystemConfiguration/SystemConfiguration.h>
> 
> @[EMAIL PROTECTED]
 reachObject
> -(IBAction)button:(id)sender
> {
>    ...
>    ...
>    ...
> 
>    const char *hostname = "google.co.uk";
>    SCNetworkConnectionFlags flags;
> 
>    if ( SCNetworkCheckReachabilityByName( hostname, &flags ))  <---
problem
> 
> 
>    ...
>    ...
> }
> 
> However, it won't compile. It's essentially claiming to know nothing
about
> SCNetworkCheckReachabilityByName.

Instead of telling us what it "essentially" says, it's usually a good 
idea to tell us what it actually says. There's always a chance you're 
misinterpreting a new-to-you message, after all.

> I'm guessing that I'm not im****ting the correct framework.
> 
> Would that be correct?

You'd want to add SystemConfiguration.framework to your project.

G
 




 8 Posts in Topic:
Small problem with SCNetworkCheckReachabilityByName
Jim <jim@[EMAIL PROTEC  2008-04-04 12:02:13 
Re: Small problem with SCNetworkCheckReachabilityByName
Jim <jim@[EMAIL PROTEC  2008-04-04 12:04:37 
Re: Small problem with SCNetworkCheckReachabilityByName
Paul Russell <prussell  2008-04-04 13:40:29 
Re: Small problem with SCNetworkCheckReachabilityByName
Jim <jim@[EMAIL PROTEC  2008-04-04 13:44:56 
Re: Small problem with SCNetworkCheckReachabilityByName
Gregory Weston <uce@[E  2008-04-04 13:41:26 
Re: Small problem with SCNetworkCheckReachabilityByName
Jim <jim@[EMAIL PROTEC  2008-04-04 15:12:40 
Re: Small problem with SCNetworkCheckReachabilityByName
Gregory Weston <uce@[E  2008-04-04 14:55:18 
Re: Small problem with SCNetworkCheckReachabilityByName
Jim <jim@[EMAIL PROTEC  2008-04-04 16:08:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 18:53:14 PST 2009.