(or "local sockets" in POSIX-speak)
A type of local socket which has an associated path and inode on the filesystem. This is useful if you want sockets that can only be used with the local machine. You could get a similar result by using Internet domain sockets and connecting to 127.0.0.1, but that would be wasteful and a potential security hazard if you don't bind() properly. UNIX domain sockets are sometimes done with the X Window System, or say, esd and things like that.
Specified with
domain family constant PF_UNIX (or
PF_LOCAL in
POSIX), or
address family AF_UNIX (again,
AF_LOCAL in
POSIX). The
address struct,
struct sockaddr_un has 2
members:
sun_family (set to
AF_UNIX/
AF_LOCAL) and
sun_path (a
char array; the
filesystem path of the
socket)