开发者

Is packet loss due to socket buffer overflow considered network loss?

If UDP packets are dropped on a host because its socket buffers are full, should I con开发者_如何学Pythonsider that to be network loss? The distinction would help me decide whether to look into implementing retransmission at the application layer, or to increase the buffer size.

I'm stuck with UDP but my application is required to transmit packets in order with no packet loss... >_<


If packets are dropped in the network stack, then you could consider it in the same way that you consider network packet loss.

UDP is not reliable. You might not receive all packets, and they might be received in a different order. You'll need a mechanism in your application to cope with this anyway.


UDP is unreliable so if you need reliability you MUST implement it yourself; it doesn't matter where the datagrams are dropped, some will be dropped and the end result is the same.

Likewise you will get duplicate datagrams and you will get datagrams in a different sequence to when you sent them.

You might be interested in the answers to this question: What do you use when you need reliable UDP?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜