Ping与iPhone SDK

Ping与iPhone SDK

问题描述:

我需要在iPhone应用程式中执行网路连线,但 NSHost 是iPhone OS不受支援的架构。有人知道其他工具或技术来实现类似的功能吗?

I need to do a network ping in an iPhone app, but NSHost is an unsupported framework for iPhone OS. Does anybody know of other tools or techniques to achive similar functionality?

搜索可达性。有一个战利品在例如。 this SO问题。有了这个,您可以测试是否可以访问主机。

Search for Reachability. Have a loot at e.g. this SO question. With this, you can test if a host can be reached.

HTH