HP Rp5405 BSD Sockets Interface Programmer's Guide - Page 21
The Client-Server Model
View all HP Rp5405 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 21 highlights
BSD Sockets Concepts The Client-Server Model The Client-Server Model Typical BSD Sockets applications consist of two separate application level processes; one process (the client) requests a connection and the other process (the server) accepts it. The server process creates a socket, binds an address to it, and sets up a mechanism (called a listen queue) for receiving connection requests. The client process creates a socket and requests a connection to the server process. Once the server process accepts a client process's request and establishes a connection, full-duplex (two-way) communication can occur between the two sockets. This set of conventions must be implemented by both processes. Depending upon the needs of your application, your implementation of the model can be symmetric or asymmetric. In a symmetrical application of the model, either process can be a server or a client. In an asymmetrical application of the model, there is a clearly defined server process and client process. An example of an asymmetrical application is the ftp service. Creating a Connection: the Client-Server Model The following figures illustrate conceptual views of the client-server model at three different stages of establishing a connection. The completed steps are included in each figure. Chapter 1 21