How to write a simple Ping method in Cocoa/Objective-C

前端 未结 7 764
一向
一向 2020-11-29 00:52

I need to write a simple ping method in Cocoa/Objective-C. It also needs to work on the iPhone.

I found an example that uses icmp, will thi

7条回答
  •  生来不讨喜
    2020-11-29 01:33

    Pinging on the iPhone works a bit different than on other platforms, due to the fact that you don't have root access. See this sample code from Apple.

提交回复
热议问题