Summary

UNIX-domain sockets can be used for communication between two or more processes on the same host. Instead of using IP addresses and port numbers as the rendezvous points, UNIX-domain sockets use physical file names on the local filesystem. This allows file permissions to be used for access control, but also complicates server code by requiring servers to unlink the file after the socket is closed.

Compared to INET-domain (TCP/IP) sockets, UNIX-domain sockets provide greater efficiency in interprocess communication and security against network-based attacks. However, an important disadvantage is that UNIX-domain sockets are not implemented as widely as TCP/IP sockets.

Get Network Programming with Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.