Overview - HP Rp3440-4 - 9000 - 0 MB RAM Programmer's Manual

Bsd sockets interface programmer’s guide
Hide thumbs Also See for Rp3440-4 - 9000 - 0 MB RAM:
Table of Contents

Advertisement

Using UNIX Domain Datagram Sockets

Overview

Overview
The UNIX Domain only allows communication between processes
executing on the same machine. In contrast to pipes, it does not require
the communicating processes to have common ancestry. For more
information on the UNIX Domain protocol, refer to the unix(7p) man
page.
UNIX domain (AF_UNIX) datagram sockets provide bidirectional,
reliable, unduplicated flow of data while preserving record boundaries.
Domain sockets significantly improve performance when compared to
local IP loopback, due primarily to the lower code execution overhead
and the fact that data is looped back at the protocol layer rather than at
the driver layer.
AF_UNIX datagram sockets allow you to send and receive messages
without establishing a connection. Each message includes a destination
address. Processes involved in data transfer are not required to have a
client-server relationship; the processes can be symmetrical.
AF_UNIX datagram sockets allow you to send to many destinations from
one socket, and receive from many sources with one socket. There is no
two-process model, although a two-process model is the simplest case of a
more general multi-process model. The terms server and client are
used in this section only in the application sense. For example, you might
have a server process that receives requests from several clients on the
same machine. This server process can send replies back to the various
clients. This can all be done with one AF_UNIX datagram socket for the
server.
The simplest two-process model is used in this section to describe
AF_UNIX datagram sockets.
The following table lists the steps required to exchange data between
AF_UNIX datagram sockets.
148
Chapter 7

Advertisement

Table of Contents
loading

Table of Contents