在Linux上的进程之间传递消息的最快技术? [英] Fastest technique to pass messages between processes on Linux?
本文介绍了在Linux上的进程之间传递消息的最快技术?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Linux上,在C ++应用程序进程之间发送消息的最快技术是什么?我模糊地知道以下技术在桌子上:
What is the fastest technology to send messages between C++ application processes, on Linux? I am vaguely aware that the following techniques are on the table:
- TCP
- UDP
-
- 套接字
- 管道
- 命名管道
- 内存映射文件
- TCP
- UDP
- Sockets
- Pipes
- Named pipes
- Memory-mapped files
有什么更多的方法,什么是最快的?
are there any more ways and what is the fastest?
推荐答案
我建议您同时参阅:如何在C中使用Linux中的共享内存。
基本上,我会删除网络协议,如TCP和UDP单机。这些有包装开销,并且绑定更多的资源(例如端口,环回接口)。
Basically, I'd drop network protocols such as TCP and UDP when doing IPC on a single machine. These have packeting overhead and are bound to even more resources (e.g. ports, loopback interface).
这篇关于在Linux上的进程之间传递消息的最快技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文