• 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: Is the internet avaliable question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is the internet avaliable question


  • Subject: Re: Is the internet avaliable question
  • From: m <email@hidden>
  • Date: Fri, 2 Apr 2004 12:16:47 -0800

On Apr 2, 2004, at 9:55 AM, Daniel Todd Currie wrote:

that still doesn't resolve the firewall issue brought up in the article... I have been playing around with the reachability API for a couple weeks, and it has not once worked through my router, and I'm pretty sure that at some point I have coded it all correctly.

Are you saying that there are cases when the reachability tells you a URL is not reachable when in fact you can reach it by using a browser? If so, I've never had this problem...

here's code that works for me:

- (BOOL)networkConnectionOK
{
BOOL result = NO;
SCNetworkConnectionFlags flags;

// IMPORTANT:
// To work with CodeWarrior you should set the
// "enums are always int" option, which the CWPro8
// Mach-O stationery fails to do.

assert(sizeof(SCNetworkConnectionFlags) == sizeof(int));

if ( SCNetworkCheckReachabilityByName("muratnkonar.com", &flags) )
{
result = !(flags & kSCNetworkFlagsConnectionRequired) && (flags & kSCNetworkFlagsReachable);
}

return result;
}

_murat


_murat
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Is the internet avaliable question
      • From: Daniel Todd Currie <email@hidden>
References: 
 >Is the internet avaliable question (From: Kevin Bracey <email@hidden>)
 >Re: Is the internet avaliable question (From: m <email@hidden>)
 >Re: Is the internet avaliable question (From: Daniel Todd Currie <email@hidden>)
 >Re: Is the internet avaliable question (From: m <email@hidden>)
 >Re: Is the internet avaliable question (From: Daniel Todd Currie <email@hidden>)

  • Prev by Date: Re: keyDown: missing events
  • Next by Date: Re: New XML support in Cocoa? Re: Java or Objective-C for Cocoa?
  • Previous by thread: Re: Is the internet avaliable question
  • Next by thread: Re: Is the internet avaliable question
  • Index(es):
    • Date
    • Thread