Question: The chat server should allow multiple chat clients to connect to it simultaneously. When a new chat client joins the server, they should be asked
The chat server should allow multiple chat clients to connect to it simultaneously.
When a new chat client joins the server, they should be asked to enter their user name.
Once they have entered their username, they should then be presented with the options to:
Create and join a new chat room; OR
Join an existing chat room provided from a list of existing chat rooms
Once the client has joined a chat room, any messages that they send to the chat room are forwarded onto other clients in the chat room, prepended with USERNAME For instance, if a client's user name is "NetworksNerd", and they send a chat message that says, "How is everyone today?", then the message that should be sent from the server to the other clients in the chat room is "NetworksNerd How is everyone today?"
The client should be able to initiate leaving the server and terminate their connection with a special close sequence "CLOSE".
Write your server and client in Python. Include a README so that the TA is able to easily compile and run your code in an Ubuntu Linux environment.
To demonstrate the correct operation of your code, you will use Tshark commandline version of Wireshark to collect a packet capture of at least clients connecting to the server and interacting with each other via the server and being able to gracefully terminate their connections with the server.
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
