Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Client/server model with SOCKETS(POSIX)

&pagelevel(2)&pagelevel

The client/server model is the most commonly used model for developing distributed applications. In the client/server model, client applications request services from a server process. This implies the asymmetry when setting up connections between a client and server as described in "SOCKETS(POSIX) basics". The present chapter uses examples to describe the interaction between the client and server in more detail and also illustrates some problems which may occur when developing client/server applications, together with their solutions.

Before a service can be granted and accepted, the communication between client and server needs a set of agreements known to both ends. These agreements are defined in a protocol that must be implemented on both ends of a connection. The protocol can be symmetric or asymmetric, depending on the conditions. In a symmetric protocol, both ends can take on the role of either client or server. With an asymmetric protocol, one end is fixed as the server and the other end as the client.

Regardless of whether a symmetric or asymmetric protocol is used for a service, when a service is accessed there is a client and a server.

The following sections describe:

  • the connection-oriented server

  • the connection-oriented client

  • the connectionless server

  • the connectionless client