3

Method from this question "How to write a Ping method in Cocoa/Objective-C" wasn't helpful, because it only assesses if there is a pathway out of the machine by which the target domain is potentially reachable. So basically almost each host which you testing will be showing as reachable, even if it's not.

1 Answer 1

5

Check out the Apple same code for SimplePing

SimplePing demonstrates ping (ICMP) send and receive. The sample runs on Mac OS X 10.5 and later, although the core code works just fine on all versions of iPhone OS and the underlying approach works on earlier versions of Mac OS X

3
  • How to use it? Is that working not for iPhone? my application isn't for iPhone Oct 21, 2011 at 21:38
  • 1
    Yea, from that page, it also says "The sample runs on Mac OS X 10.5 and later"
    – chown
    Oct 21, 2011 at 21:40
  • I recently had the same issue come up in a project. SimplePing is exactly what it says on the tin - it sends out a ping and waits for the callback. If you want to get ping times, you need to slightly modify its functionality. Oct 21, 2011 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.