A socket is a special file used for inter-process communication. These allow communication between two processes. In addition to sending data, processes can sendfile descriptorsacross a Unix domain socket connection using thesendmsg
()
andrecvmsg
()
system.
Unlike named pipes, sockets are fully duplex-capable.
A socket is marked with ans
as the first letter of the mode string, e.g.