Question: I need help with this in Java please: The Simple Client Server Chat Application should implement the following functionalities: The application will contain a server
I need help with this in Java please:
The Simple Client Server Chat Application should implement the following functionalities:
- The application will contain a server and two or more than two clients (for chatting)
- Each client should be able to connect with the server. Once connected, the server will assign a unique identifier name to each of these clients.
- Once a new client (say Client A) is connected to the server, in response, the server will provide the list of all the available clients connected to it. In the simplest scenario, you can just have two clients connected to the server.
- Client (i.e. Client A) will use the identification name provided by the server to send the message to another client (say Client B).
- You can decide the implementation you want for an identification number. (I would suggest a combination of random number + some Name, by that way, a client can know with whom it is talking to).
- Once the server receives the message from a client (Client A), it will forward the message to the intended client (Client B) and vice-versa. (For simplicity: only implement for the case when both of the clients are available for the chat).
- A client can disconnect from the server by sending .exit message anytime. Server upon receiving .exit message from the client, will close the connection with it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
