When using sockets for inter-process communication running on the same machine, AF_UNIX and AF_INET often use AF_INET for inter-process communication in the system, as they believe there is no significant difference in functionality or performance.
I haven't had any trouble so far, but I'd like to ask you a question if there's a problematic difference.
AF_INET
is identified by the IPv4+ port number.Therefore, IPv4 is required for the contact.AF_UNIX
is identified by filename.Therefore, the communication partner is a process that runs on the same machine.(e.g. X server and X client)
Both are completely different.
© 2024 OneMinuteCode. All rights reserved.