Unix domain socket
POSIX local inter-process communication sockets (including Unix domain socket or IPC socket ) are endpoints of bidirectional communication links with the local interprocess communication (IPC) under Unix operating systems . Communication via these sockets is the standardized method in the POSIX standard for interprocess communication for Unix-like systems. According to the Unix philosophy (“ everything is a file ”), sockets can be addressed via an inode in the file system and are addressed with the same commands as ordinary files. To communicate, two processes open the same socket. The data flows as a stream of bytes via buffer memory in the memory of the kernel . In addition to data on the socket connections with the system calls sendmsg () and recvmsg () and file handles are transferred.
literature
- W. Richard Stevens, Bill Fenner, Andrew M. Rudoff: UNIX Network Programming. The Sockets Networking API. Volume 1 . 3. Edition. Addison Wesley, 2004, ISBN 0-13-141155-1 , 15.Unix Domain Protocols, pp. 411-433 .
- W. Richard Stevens, Stephen A. Rago: Advanced Programming in the UNIX Environment . 2nd Edition. Addison Wesley, 2005, ISBN 0-321-52594-9 , 17.3 UNIX Domain Sockets, p. 594-601 .
- Johannes Plötner, Steffen Wendzel: Linux. The comprehensive manual . 5th edition. Galileo, 2012, ISBN 978-3-8362-1822-1 ( Table of Contents - 26.6.5 Unix Domain Sockets ).
Web links
-
socketpair(2)
: create two connected sockets - Debian GNU / Linux system calls man page -
socketpair(2)
: Create a pair of connected sockets - OpenBSD system calls Manual (generation of connected sockets each other) -
sendmsg(2)
: send a message from a socket - OpenBSD System Calls Manual (sending messages over a socket) -
recvmsg(2)
: Receive a message from a socket - OpenBSD system calls Manual (receiving messages via a socket) -
cmsg(3)
: access ancillary data - Debian Linux Programmer's Manual (sending / receiving / managing additional information) - Comparison between Unix Domain Sockets and Internet Sockets under FreeBSD , 2005 (English)
- Unix Domain Sockets for Java (English)
- ucspi-unix , client and server implementation of UCSPI via UNIX domain sockets (English)