Sockets Overview
Sockets provide point-to-point, two-way communication between two processes. Sockets are a basic component of interprocess and inter-system communication. A socket is an endpoint of communication to which a name can be bound. It has a type and one or more associated processes.
Sockets exist in communication domains. A socket domain is an abstraction
that provides an addressing structure and a set of protocols. Sockets connect
only with sockets in the same domain. Twenty three socket domains are identified
(see sys/socket.h
), of which only the UNIX and Internet
domains are normally used in Oracle Solaris and compatible operating systems.
You can use sockets to communicate between processes on a single system,
like other forms of IPC. The UNIX domain (AF_UNIX
) provides
a socket address space on a single system. UNIX domain sockets are named with
UNIX paths. UNIX domain sockets are further described in UNIX Domain Sockets.
Sockets can also be used to communicate between processes on different systems.
The socket address space between connected systems is called the Internet
domain (AF_INET
). Internet domain communication uses the
TCP/IP internet protocol suite. Internet domain sockets are described in Socket Interfaces.