The communication process is this minimal orocess:
- Client sends string size to server
- Client sends string to server
- Server sends string back to client
The iterative and concurrent versions share the same client (As it is a design of the server)
The server maintains one thread and responds with it. Multiple requests are queued for response, and dealt with in a FIFO manner.
Two cases are shown here:
- Client cannot connect as server isn't running
- Insufficient arguments provided
It can be seen that all the processes share the same pid, showing that the same process is being used
The server forks to respond to the client. Additionally, a signal handler needs to be present, to remove the exit child processes after they have responded to the client.
Two cases are shown here:
- Client cannot connect as server isn't running
- Insufficient arguments provided
The different pids depict that the process forks in order to respond. This allows multiple clients to connect to the server and communicate with it at the same time.