How to identify internet connection type and it's current speed [closed]

扶醉桌前 提交于 2019-12-25 17:43:22

问题


Hi I am testing my application for various types of internet connections with my device. I want my application send an internet request only if WI-FI is available and not in other cases like GPS ,WAP, 3G, etc....

Please also provide some information about how to check the current speed of that particular connection.

Thanks in advance


回答1:


Use Apple's Reachability class to check for Wifi or WAN. Use this example and code: http://developer.apple.com/library/ios/#samplecode/Reachability/index.html

Checking the speed is more difficult, you would need to measure it by your own I think, maybe the best way is to ping and measure the response latency.



来源:https://stackoverflow.com/questions/3853492/how-to-identify-internet-connection-type-and-its-current-speed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!