Search for question
Question

Part #5: Chat Room

Create a chat room server that can handle multiple clients.

Server: When a client joins the server should print their name and say they have joined the chat. For

example, if the user's name is Bob you should print "Bob has joined the Chat Room." The server should

keep track of everything sent from each of the clients. The entire conversation should be printed by the

server (and it should be clear who sent what).

Each Client: When a client connects, they should be prompted to choose a username. When another

client joins each existing client should receive a message saying the user's name and that they have

joined the chat (Note: this is the same message the server prints). When the user types and sends a

message the existing clients should see that user's username and the message they sent. See below for

an example.

Fig: 1