Question: I need a python or java code for the solution of this assignment ad with explainations The goal of this assignment is to implement a
I need a python or java code for the solution of this assignment ad with explainations The goal of this assignment is to implement a TCP client and server. You can use either C or Java. Your TCP clientserver will communicate over the network and exchange data.
The server will start in passive mode listening for a transmission from the client. The client will then start and contact the server on a given IP address and port number If the server is down then the client must display the following message:
"Server is down, please try later."
If server is running, then the client will ask the user to input the following commands:
B: to convert to binary
: to convert to hexadecimal
: to quit the client program
If the command is not quit, then the user should input a number to be converted to BinaryHexadecimal The client should display appropriate messages for input errors. If input is correct, then the client will pass the server a request. The request has two parts, a letter and number. The letter is either to convert the number to binary or to convert the number to hexadecimal.
On receiving a request from the client, the server should convert the number to the equivalent value in binary or hexadecimal based on the received request and return it to the client. Of course the server must check for errors and respond with one of the following messages:
Message
Description
or AF and the number is based on the request
Bad request Missing or
The number is missing Missing the number
Request is empty Missing both the letter and number
The server should not output anything on the screen.
Upon receiving the server's response, the client will display the equivalent value in binary or hexadecimal if the code is Otherwise if the code is not then the error message must be displayed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
