Why Does Unix Require a Domain Socket?
Contents

Processes reference Unix domain sockets as file system inodes, so two processes can communicate by opening the same socket. … This allows the sending processes to grant the receiving process access to a file descriptor for which the receiving process otherwise does not have access.

How does Unix domain socket work?

After a UNIX domain socket is created, you must bind the socket to a unique file path by using the bind function. … Unlike internet sockets in the AF_INET domain where the socket is bound to a unique IP address and port number, a UNIX domain socket is bound to a file path.

Does Unix socket need port?

When the host is “localhost”, MySQL Unix clients use a Unix socket, AKA Unix Domain Socket, rather than a TCP/IP socket for the connection, thus the TCP port doesn’t matter.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest