开发者

Server Ping with iPhone

开发者 https://www.devze.com 2023-04-11 21:46 出处:网络
I\'m writing an app that needs to know which of two servers responds fastest.One server is in my time zone, the other is far away.

I'm writing an app that needs to know which of two servers responds fastest. One server is in my time zone, the other is far away.

How do I get the round trip time from a server ping on the iPhone?

I looked at Reachability, and 开发者_运维问答I don't think it does what I need in this case. Alternate solutions are welcome as well. Thanks!


You could use this implementation of ping - source

Or, Apple has an example App you can look at - SimplePing

Another option is to use an existing lib: http://www.kernelthread.com/projects/hanoi/html/icmp.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号