UDP在本地主机上的可靠性 [英] Reliability of UDP on localhost

查看:91
本文介绍了UDP在本地主机上的可靠性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道UDP本质上是不可靠的,但是当连接到localhost时,我希望内核以不同的方式处理连接,因为一切都可以在内部处理.因此,在这种特殊情况下,UDP是否被认为是可靠的协议,或者如果缓冲区溢出,内核是否仍会垃圾某些数据包?

I know that UDP is inherently unreliable, but when connecting to localhost I would expect the kernel handles the connection differently since everything can be handled internally. So in this special case, is UDP considered a reliable protocol, or will the kernel still potentially junk some packets if buffers are overrun?

推荐答案

我重复

I repeat a previous answer to a related question. To remain portable always anticipate your UDP sockets might drop packets or receive out of order data.

这篇关于UDP在本地主机上的可靠性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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