在同一台机器上通过 UDP 套接字发送数据可靠吗? [英] Is sending data via UDP sockets on the same machine reliable?

查看:14
本文介绍了在同一台机器上通过 UDP 套接字发送数据可靠吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用 UDP 套接字进行进程间通信,我可以期望其他进程以相同的顺序接收所有发送数据吗?

If i use UDP sockets for interprocess communication, can i expect that all send data is received by the other process in the same order?

我知道这对于一般的 UDP 来说是不正确的.

I know this is not true for UDP in general.

推荐答案

没有.我以前被这个咬过.您可能想知道它是如何失败的,但您会遇到待处理数据包的缓冲区已填满的问题,因此数据包将被丢弃.网络子系统如何丢弃数据包取决于实现,没有在任何地方指定.

No. I have been bitten by this before. You may wonder how it can possibly fail, but you'll run into issues of buffers of pending packets filling up, and consequently packets will be dropped. How the network subsystem drops packets is implementation-dependent and not specified anywhere.

这篇关于在同一台机器上通过 UDP 套接字发送数据可靠吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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