Skip Navigation Links | |
Exit Print View | |
Programming Interfaces Guide Oracle Solaris 11.1 Information Library |
2. Session Description Protocol API
POSIX Interprocess Communication
Permissions for Messages, Semaphores, and Shared Memory
IPC Interfaces, Key Arguments, and Creation Flags
Sending and Receiving Messages
Accessing a Shared Memory Segment
Controlling a Shared Memory Segment
Attaching and Detaching a Shared Memory Segment
8. Programming With XTI and TLI
10. Transport Selection and Name-to-Address Mapping
11. Real-time Programming and Administration
Sockets provide point-to-point, two-way communication between two processes. Sockets are a basic component of interprocess and intersystem 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 OS 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 Appendix A, 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 Chapter 7, Socket Interfaces.