Question: Description: Your task is to implement a simple TCP protocol following an RFC-style specification. You will write a server application that listens on TCP port

Description: Your task is to implement a simple TCP protocol following an RFC-style specification. You will write a server application that listens on TCP port 8008. You will also write a corresponding client application that connects to this port to run the commands that the server implements. The server can run in the foreground and should take no arguments. It should print informational messages to the screen as the client connects.The server can be single-threaded and only accept one client connection at a time. Example: C:\python server.py The client should also run in foreground and take no arguments. The server name and port number are in the client code. The client should print informational messages as it runs different commands over the TCP connection. The client is NOT interactive and should not prompt the user for input. Your client should run each command the server implements at least once. Example: C:\python client.py Requirements Write the programs in python. They will compile/run on a standard python3 interpreter. Refrain from using any third party network libraries. There will be two files, server.py and client.py. Take a screenshot of your server window and the client window showing the client sending commands.

Your server must implement the following commands. 1. HELO Upon successful connection, a client MUST say hello. The client MUST send the string HELO where is theclients hostname. Examples: Client: HELO mycomputer Server: Hello mycomputer, pleased to meet you.

2. REQTIME The client can request the servers current time with the REQTIMEcommand. The server MUST respond in ISO8601 format hh:mm:ss. Examples: Client: REQTIME Server: 22:23:14

3. REQDATE The client can request the servers current date with the REQDATEcommand. The server MUST respond in ISO8601 format YYYY-MM-DD. Examples: Client: REQDATE Server: 2014-01-29 4. ECHO The client can request the server echo back a text string using the ECHO command.This is useful when debugging a client. Client: ECHO this is some random text. Server: this is some random text.

5. REQIP The client can request the server print the clients IP address. This is useful to find the clients real IP if behind a NAT router. Client: REQIP Server: 147.174.73.237

6. BYE The client can request the server end the TCP connection. Theserver MUST respond and immediately close the connection. Client: BYE Server: See ya later!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!