• 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
behaviour of SCNetworkCheckReachablityByName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

behaviour of SCNetworkCheckReachablityByName


  • Subject: behaviour of SCNetworkCheckReachablityByName
  • From: "Gurmit Teotia" <email@hidden>
  • Date: Sat, 29 Apr 2006 18:12:17 +0530

Hi All,
In my application I will have to check at regular interval if a computer is connected to network or not. To implement this funtionality I was checking the behaviour of SCNetworkCheckReachablityByName.
Below is the code snippet:
 
SCNetworkConnectionFlags status;
BOOL result;
result=SCNetworkCheckReachabilityByName("XYZ",&status);
 
NSLog(@"Result= %d status=%d",result,status);
 
Output is always Result=1 status=0 whether "XYZ" computer is connected to network or not. If I include domain name computer name as follow:
 
 
SCNetworkConnectionFlags status;
BOOL result;
result=SCNetworkCheckReachabilityByName("XYZ.MyDomain.com",&status);
 
NSLog(@"Result= %d status=%d",result,status);
 
Then output is always "Result=1 status=2"  whether computer is connected to network or not.
Can someone explain this behaviour? Is that behaviour correct? Please also suggest if I'm using the right approach to check if a computer is connected to network or not.
 
Thanks,
Gurmit
 _______________________________________________
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

  • Follow-Ups:
    • Re: behaviour of SCNetworkCheckReachablityByName
      • From: Allan Nathanson <email@hidden>
  • Prev by Date: Re: Unusable DNS, 10.4 Tiger (Fixed)
  • Next by Date: Re: behaviour of SCNetworkCheckReachablityByName
  • Previous by thread: Re: Unusable DNS, 10.4 Tiger (Fixed)
  • Next by thread: Re: behaviour of SCNetworkCheckReachablityByName
  • Index(es):
    • Date
    • Thread