所需 URL 的网络可达性
我面临网络可达性问题。
我已经使用了苹果提供的可达性类,并完成了所有必要的步骤来获得主机的可达性。
它适用于任何有效的网站,例如:
- www.apple.com
- www.google.com
- 等。
对于所有这些网站,我曾经将主机可达性响应视为可达,但是当我给出特定的 IP 时(例如: http://196.12.125.34/) 这是我检查主机可达性所必需的,它给出了否定响应,即不可达。
谁能建议可能是什么问题?
I am facing a issue on network reachability.
I have used the reachability class provided by apple and have done all necessary steps to get the host reachability.
It works fine for any valid site eg.:
- www.apple.com
- www.google.com
- etc.
For all these sites i used to get the host reachability response as reachable, but when I give a specific IP(eg: http://196.12.125.34/) which is required by me to check for the hostReachability it gives negative response i.e notReachable.
Can anyone suggest what may be the issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要对 IP 地址的可达性使用不同的方法:
对于主机名:
对于 IP 地址:
You need to use a different method on Reachability for IP Address:
For host name:
For IP Address: