HP Rp7410 BSD Sockets Interface Programmer's Guide - Page 148
Using UNIX Domain Datagram Sockets
View all HP Rp7410 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 148 highlights
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