Unix Sockets : AF_LOCAL vs AF_INET

前端 未结 1 1597
面向向阳花
面向向阳花 2021-02-19 08:30

I\'m just starting with socket programming in UNIX and I was reading the man pages for the socket system call. I\'m a bit confused about the AF_LOCAL argument and when it is use

1条回答
  •  太阳男子
    2021-02-19 09:24

    AF_LOCAL uses UNIX domain sockets which are local to the filesystem and can be used for internal communications. AF_INET is an IP socket. AF_LOCAL will not incur some performance penalties related to sending data over IP. See this old but very nice discussion of the topic.

    0 讨论(0)
提交回复
热议问题