behaviour of SCNetworkCheckReachablityByName
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;
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