繁体   English   中英

为什么UDP收件人两次收到相同的数据包?

[英]Why do the UDP recipient receive the same packet in twice?

为什么UDP收件人会在两次收到相同的数据包? UDP发送方只是向接收方发送一个数据包,但接收方接收数据包两次,两个数据包相同。发送方和接收方在不同的设备上运行。发送方APP在Android设备上运行,收件人是在iOS设备上运行。 如何解释此案例以及如何解决?

来自http://en.wikipedia.org/wiki/User_Datagram_Protocol

UDP uses a simple transmission model with a minimum of protocol mechanism.
It has no handshaking dialogues, and thus exposes any unreliability of the
underlying network protocol to the user's program. As this is normally IP
over unreliable media, there is no guarantee of delivery, ordering or
duplicate protection.

如果您想避免这种情况,则必须使用TCP。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM