AF_UNIX domain - why use local file names only?

前端 未结 3 1651
我寻月下人不归
我寻月下人不归 2021-01-05 09:32

When using socket in the UNIX domain, it is advisable to use path name for the directory directory mounted on the local disk. The UNIX domain only allows inte

3条回答
  •  春和景丽
    2021-01-05 10:11

    The end-points of UNIX domain sockets are represented by files in the file system (instead of by host / port).

    However the communication between processes is done within the local system and does not result in a seekable file getting stored anywhere.

    The advantage of using the file system as the namespace for the end-points is that normal file permissions and ACLs can be applied - if you can't open the end-point you can't connect. IP sockets have no such mechanism.

提交回复
热议问题