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

查看:146
本文介绍了在同一台机器上可靠通过发送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天全站免登陆