Question: Plz use PYTHON to ANSWER THIS QUESTION Description Write both the CLIENT and SERVER-side code using PYTHON. In this assignment, you will design and implement
Plz use PYTHON to ANSWER THIS QUESTION
Description
Write both the CLIENT and SERVER-side code using PYTHON.
In this assignment, you will design and implement a service to evaluate arithmetic expressions, as well as a testing client.
Protocol Spec
Request format
1. Number of expressions to evaluate. [2 bytes]
2. Length of 1st expression in bytes. [2 bytes]
3. String representation of 1st expression.
4. Length of 2nd expression in bytes. [2 bytes]
5. String representation of 2nd expression.
6.
7. Length of nth expression in bytes. [2 bytes]
8. String representation of nth expression.
Response format
1. Number of answers. [2 bytes]
2. Length of 1st answer in bytes. [2 bytes]
3. String representation of 1st answer.
4. Length of 2nd answer in bytes. [2 bytes]
5. String representation of 2nd answer.
6.
7. Length of nth answer in bytes. [2 bytes]
8. String representation of nth answer.

Requirements
1. All numbers in expressions are integers.
2. Required to handle +, -, *, /. Optional for parenthesis.
3. Dont use eval in Python.
4. Use TCP as transport layer protocol.
5. Implement both server and client (server needs to be multithreaded).
6. Limit your buffer size for send/recv API to 16 bytes. (So you need to have axillary
function to call recv multiple times to make sure entire request/response is received).
Example request 2 4 "3+12" 2 bytes 2 bytes 4 bytes 2 bytes 6 bytes Example response 2 2 "15" 1 5 2 bytes 2 bytes 2 bytes 2 bytes byte
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
