UNIX domain sockets

A UNIX socket is an inter-process communication mechanism that allows bidirectional data exchange between processes running on the same machine.

IP sockets (especially TCP/IP sockets) are a mechanism allowing communication between processes over the network.

In some cases, you can use TCP/IP sockets to talk with processes running on the same computer (by using the loopback interface).

UNIX domain sockets know that they're executing on the same system, so they can avoid some checks and operations (like routing);

which makes them faster and lighter than IP sockets.

So if you plan to communicate with processes on the same host, this is a better option than IP sockets.

相关推荐
sky北城5 分钟前
Linux的回收站机制实现方式总结
linux·运维·服务器
橘子真甜~22 分钟前
C/C++ Linux网络编程10 - http协议
linux·服务器·网络·c++·网络协议·http
实心儿儿2 小时前
Linux —— 基础开发工具4
linux·运维·服务器
马儿能够一直跑2 小时前
同一个环境中安装两个不同版本esp-idf的python冲突解决方案
linux·运维·服务器
Unlyrical3 小时前
为什么moduo库要进行线程检查
linux·服务器·开发语言·c++·unix·muduo
橘颂TA3 小时前
【Linux】System V 通信——共享内存
linux·运维·服务器·c++
天赐学c语言3 小时前
Linux - 网络基础概念
linux·服务器·网络·socket
檀越剑指大厂4 小时前
【Linux系列】Linux中的复制与迁移
linux·运维·服务器
虾..4 小时前
Linux 文件系统与inode结构
linux·运维·服务器
电子_咸鱼5 小时前
【QT SDK 下载安装步骤详解 + QT Creator 导航栏使用教程】
服务器·开发语言·网络·windows·vscode·qt·visual studio code