[SOLVED] CS3093D Assignment 4

30.00 $

Category: Tags: ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon ASS4-3exi2o.zip (652.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product
  1. Implement a fully concurrent application with a TCP server acting as a directory server and client programs allowing concurrent connection and message transfer (Eg. Chat system).
  2. Implement a fully concurrent application with a TCP server acting as a dummy ”math” server and client programs allowing concurrent connection and message transfer. The server should be a multi-process server that will fork a process for every new client it receives and it should be able to handle addition, multiplication, subtraction, and division operations on two integer operands. The protocol between the client and server is as follows.
    • The client connects to the server, and then asks the user for input. The user enters a simple arithmatic expression string (e.g., ”1 + 2”, ”5 – 6”, ”3 * 4”, ”8/2”). The user’s input is sent to the server via the connected socket.
    • The server reads the user’s input from the client socket, evaluates the expression, and sends the result back to the client.
    • The client should display the server’s reply to the user, and prompt the user for the next input, until the user terminates the client program with Ctrl+C.

Server:

Connected with client 1

[Client1]: 22 + 44 [Server]: 66
Connected with client 2

[Client2]: 3 * 4 [Server]: 12

Client 1:

Connected to the server enter the querry: 22 + 44

[Server]: 66

Client 2:

Connected to the server enter the querry: 3 * 4

[Server]: 12

1

  • ASS4-3exi2o.zip