|
|
HP 9000 Networking: BSD Sockets Interface Programmer's Guide > Chapter 7 Using UNIX Domain Datagram SocketsPreparing Address Variables |
|
Before your client process can make a request of the server process, you must establish the correct variables and collect the information you need about the server process. Your server process needs to: Your client process needs to:
These activities are described next. Refer to the program example at the end of this chapter to see how these activities work together. You need to declare a variable of type struct sockaddr_un to use for the socket address for both processes. For example, the following declaration is used in the example server program:
sockaddr_un is a special case of sockaddr and is used with AF_UNIX address domain. The sockaddr_un address structure is defined in sys/un.h and consists of the following fields:
The server process only needs one address for its socket. Any process that knows the address of the server process can then send messages to it. Thus, your client process needs to know the address of the server socket. The client process will not need an address for its own socket, unless other processes need to refer to the client process. |
|