Unix domain socket

from Wikipedia, the free encyclopedia

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