The domain passed is AF_UNIX in socket() method call
Before Windows natively supported Unix domain sockets in late 2017, developers relied on Named Pipes as the primary, high-performance solution for local Inter-Process Communication (IPC)
It is unidirectional data channel using stdin/stdout
It is FIFO
Bidirectional communication can be achieved using 2 anonymous pipes
Examples
| in terminal to pass output of one process to another
stdio transport in MCP server
Named Pipes
Instead of using stdin and stdout, special files are created in filesystem
These special files have no contents on the file system
They persists unless deleted unlike anonymous pipe which is ephemeral
It is FIFO
# create a named pipemkfifo my_pipe# check file metadata# prw-r--r-- 1 KartikeyKumar staff 0 28 Jun 17:13 my_pipels -al my_pipe# Terminal 1: waits for datacat my_pipe# Terminal 2: sends data to Terminal 1echo "Hello from Terminal 2!" > my_pipe# remove the named piperm my_pipe
Message queue
A data stream similar to a socket, but which usually preserves message boundaries
Allow multiple processes to read/write to the message queue without being directly connected to each other