Android的UDP数据包丢失 [英] Android UDP packet loss

查看:493
本文介绍了Android的UDP数据包丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我写发送为5Kb通过UDP数据包出15次第二的应用程序。我明白,我会失去一些数据包,但我似乎是第几秒钟后,我失去所有的数据包。即使我慢下来到为5Kb数据包发送每10秒一次,我还是会失去他们。什么会导致此?

So i'm writing an app that sends 5Kb packets out 15 times a second through UDP. I understand I will lose some packets but I seem to be losing all my packets after the first couple seconds. Even if I slow it down to send the 5Kb packets out once every 10 seconds I will still lose them. What would cause this?

推荐答案

这并不奇怪,他们都在下降。有效载荷<一个href=\"http://stackoverflow.com/questions/1098897/what-is-the-largest-safe-udp-packet-size-on-the-internet\">bigger大于512字节是不可能做出来的网络。这取决于你的路由器MTU的多少带宽分配给UDP /互联网流量的路由器上。

It's not surprising that they are all dropped. A payload bigger than 512 bytes is unlikely to make it out of the network. It depends on the MTU of your router and how much bandwidth is allocated to UDP / internet traffic on the router.

这篇关于Android的UDP数据包丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆