簡體   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