Unix File Types - Socket

Socket

A socket is a special file used for inter-process communication. These allow communication between two processes. In addition to sending data, processes can send file descriptors across a Unix domain socket connection using the sendmsg and recvmsg system calls.

Unlike named pipes sockets are fully duplex-capable.

A socket is marked with an s as the first letter of the mode string, e.g.

srwxrwxrwx ... /tmp/.X11-unix/X0

Read more about this topic:  Unix File Types