JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Programming Interfaces Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Memory and CPU Management

2.  Session Description Protocol API

3.  Process Scheduler

4.  Locality Group APIs

5.  Input/Output Interfaces

6.  Interprocess Communication

Pipes Between Processes

Named Pipes

Sockets Overview

Doors Overview

POSIX Interprocess Communication

POSIX Messages

POSIX Semaphores

POSIX Shared Memory

System V IPC

Permissions for Messages, Semaphores, and Shared Memory

IPC Interfaces, Key Arguments, and Creation Flags

System V Messages

Initializing a Message Queue

Controlling Message Queues

Sending and Receiving Messages

System V Semaphores

Initializing a Semaphore Set

Controlling Semaphores

Semaphore Operations

System V Shared Memory

Accessing a Shared Memory Segment

Controlling a Shared Memory Segment

Attaching and Detaching a Shared Memory Segment

7.  Socket Interfaces

8.  Programming With XTI and TLI

9.  Packet Filtering Hooks

10.  Transport Selection and Name-to-Address Mapping

11.  Real-time Programming and Administration

12.  The Oracle Solaris ABI and ABI Tools

A.  UNIX Domain Sockets

Index

Sockets Overview

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.