iOS网络可达性 – 似乎不起作用

iOS网络可达性 – 似乎不起作用,第1张

概述我正在关注 How to check for an active Internet connection on iOS or OSX?和 http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html以测试连接性,但我遇到了一些非常基本的问题. 例如,我正在从另一台机器上运行.NET A 我正在关注 How to check for an active Internet connection on iOS or OSX?和 http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html以测试连接性,但我遇到了一些非常基本的问题.

例如,我正在从另一台机器上运行.NET API,然后尝试通过我的mac mini连接到它.

1)当IIS运行时,一切都正常运行,我很高兴我得到了这个工作!

2)我可以完全关闭IIS(很明显,主机无法访问),但我的reachabilityWithHostname仍然报告主机可以访问.

有任何想法吗?

解决方法 见 SCNetworkReachability Reference.

The SCNetworkReachability programming
interface allows an application to
determine the status of a system’s
current network configuration and the
reachability of a target host. A
remote host is consIDered reachable
when a data packet,sent by an
application into the network stack,
can leave the local device.
Reachability does not guarantee that
the data packet will actually be
received by the host.

打开和关闭IIS只会阻止您的服务器接收诸如ftp / http之类的Web请求,并且不会阻止设备成功发送数据包.

总结

以上是内存溢出为你收集整理的iOS网络可达性 – 似乎不起作用全部内容,希望文章能够帮你解决iOS网络可达性 – 似乎不起作用所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1114691.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存