<legend id='zJBRN'><style id='zJBRN'><dir id='zJBRN'><q id='zJBRN'></q></dir></style></legend>
  • <small id='zJBRN'></small><noframes id='zJBRN'>

    <tfoot id='zJBRN'></tfoot>
        <bdo id='zJBRN'></bdo><ul id='zJBRN'></ul>

      1. <i id='zJBRN'><tr id='zJBRN'><dt id='zJBRN'><q id='zJBRN'><span id='zJBRN'><b id='zJBRN'><form id='zJBRN'><ins id='zJBRN'></ins><ul id='zJBRN'></ul><sub id='zJBRN'></sub></form><legend id='zJBRN'></legend><bdo id='zJBRN'><pre id='zJBRN'><center id='zJBRN'></center></pre></bdo></b><th id='zJBRN'></th></span></q></dt></tr></i><div id='zJBRN'><tfoot id='zJBRN'></tfoot><dl id='zJBRN'><fieldset id='zJBRN'></fieldset></dl></div>

        iPhone 在 3G 上的典型 UDP 延迟 - 我的数字对吗?

        时间:2023-10-05
          <tbody id='LF6dd'></tbody>
          <bdo id='LF6dd'></bdo><ul id='LF6dd'></ul>

          • <legend id='LF6dd'><style id='LF6dd'><dir id='LF6dd'><q id='LF6dd'></q></dir></style></legend>

            <small id='LF6dd'></small><noframes id='LF6dd'>

                <i id='LF6dd'><tr id='LF6dd'><dt id='LF6dd'><q id='LF6dd'><span id='LF6dd'><b id='LF6dd'><form id='LF6dd'><ins id='LF6dd'></ins><ul id='LF6dd'></ul><sub id='LF6dd'></sub></form><legend id='LF6dd'></legend><bdo id='LF6dd'><pre id='LF6dd'><center id='LF6dd'></center></pre></bdo></b><th id='LF6dd'></th></span></q></dt></tr></i><div id='LF6dd'><tfoot id='LF6dd'></tfoot><dl id='LF6dd'><fieldset id='LF6dd'></fieldset></dl></div>
                <tfoot id='LF6dd'></tfoot>
                1. 本文介绍了iPhone 在 3G 上的典型 UDP 延迟 - 我的数字对吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  为了在 iPhone 上评估 TCP 与 UDP,我在我的计算机上编写了一个小型回显服务器,并在 iPhone 上使用了 AsyncUdpSocket 库,但是延迟出乎意料地大,我想知道我的实现是否有问题不知何故.

                  In order to evaluate TCP versus UDP on the iPhone, I wrote a small echo server on my computer and used the AsyncUdpSocket library on the iPhone, but latencies are coming out surprisingly large and I wonder if there is something wrong with my implementation somehow.

                  我的设置有一个 wifi 路由器(Apple Airport),它有一个外部静态 IP.回显服务器使用的端口被转发到我的开发计算机.

                  My setup has a wifi-router (Apple Airport) which has an external static IP. The port used by the echo server is forwarded to my development computer.

                  我使用了两种不同的设置:

                  I used two different setups:

                  1. iPhone -> Wifi -> Wifi 路由器 -> Wifi -> 电脑
                  2. iPhone -> 3G -> Wifi 路由器 -> Wifi -> 电脑

                  数据包大小约为 10 个字节.

                  Packet size was around 10 bytes.

                  在第一种情况下,往返时间从 9 毫秒到 600 毫秒不等.大多数情况下,我会看到大约 300 毫秒的中位数,但有些运行只有 30 毫秒.

                  In the first case, roundtrip varied from 9 ms to 600 ms. Mostly I would see a median of around 300 ms, but some runs would have only 30 ms.

                  第二种情况...最好的情况是 2000 毫秒,移动到 5000 毫秒.

                  Second case... Best case 2000 ms, moving up to 5000 ms.

                  实现会发送一个 UDP 数据包,等待它返回,然后发送下一个.

                  Implementation would send an UDP packet, wait until it gets back, then send the next.

                  我最初认为实现有问题,但从模拟器运行它得到的一致延迟只有 7 毫秒.

                  I initially believed something was wrong with the implementation, but running it from the simulator give a consistent latency of only 7 ms.

                  我的数字是正确的还是发生了什么奇怪的事情?

                  Are my numbers right or is something weird going on?

                  推荐答案

                  我看到了这个关于 iphone Wifi 延迟的链接 我决定尝试更快地抽取 UDP 数据包.

                  I saw this link on iphone Wifi latency and I decided to try pumping UDP packets faster.

                  我开始降低接收 ping 和发送新 ping 之间的延迟,直到达到 50 毫秒.

                  I started lowering my delay between receiving a ping and sending a new ping until I reached 50 ms.

                  在 50 毫秒时,使用 3G 的 UDP ping(往返)下降到大约 80 毫秒(请记住,这最初是大约 2000 毫秒)!

                  At 50 ms, the UDP ping (roundtrip) was down to around 80 ms using 3G (remember, this was originally around 2000 ms)!

                  TCP 也有所改进,但不如 UDP.我会得到 100-200 毫秒,再次使用 3G.

                  TCP also improved, but not as much as UDP. I would get 100-200 ms, again on 3G.

                  我的结论是 iPhone 会关闭天线,这会严重影响 UDP.TCP 更好,因为手机知道打开的连接并且开机速度更快.

                  My conclusion is that iPhone powers down the antennae, which severely affects UDP. TCP is better, because the phone knows of the open connection and is faster to power up.

                  顺便在丢包期间,TCP 会达到 1000-2000 毫秒的 ping.这与自己的观察结果相吻合,即 TCP 连接偶尔会在 iPhone 上遭受较大的延迟.

                  Incidentally during packet loss, TCP would reach pings of 1000-2000 ms. This coincides with own observations that TCP connections would occasionally suffer large delays on the iPhone.

                  这篇关于iPhone 在 3G 上的典型 UDP 延迟 - 我的数字对吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用多个参数快速上传图像 下一篇:Android:如何检查 Google 是否可用?

                  相关文章

                  <i id='Htf4q'><tr id='Htf4q'><dt id='Htf4q'><q id='Htf4q'><span id='Htf4q'><b id='Htf4q'><form id='Htf4q'><ins id='Htf4q'></ins><ul id='Htf4q'></ul><sub id='Htf4q'></sub></form><legend id='Htf4q'></legend><bdo id='Htf4q'><pre id='Htf4q'><center id='Htf4q'></center></pre></bdo></b><th id='Htf4q'></th></span></q></dt></tr></i><div id='Htf4q'><tfoot id='Htf4q'></tfoot><dl id='Htf4q'><fieldset id='Htf4q'></fieldset></dl></div>
                  1. <tfoot id='Htf4q'></tfoot>
                      • <bdo id='Htf4q'></bdo><ul id='Htf4q'></ul>

                      <small id='Htf4q'></small><noframes id='Htf4q'>

                      <legend id='Htf4q'><style id='Htf4q'><dir id='Htf4q'><q id='Htf4q'></q></dir></style></legend>