Chat server implementation using SocketServer.IO in Java code for server-side and simple index.html for client-side. Added implementation improvement such as:
- Broadcast a message to connected users when someone connects or disconnects.
- Add support for nicknames.
- Don’t send the same message to the user that sent it. Instead, append the message directly as soon as they press enter.
- Add “{user} is typing” functionality.
- Show who’s online.
- Add private messaging.
- Run the server by running the HelloServer.java file.
- Open the index.html file in your browser by accessing: http://localhost:3000/
- Start chatting!
- Enter your nickname and press enter to join the chat.
- Click on the user's name to send a private message to them.
- Unclick to stop sending private message and continue to public message.
- Start chatting with your friends!
- Use the
/nick
command to change your nickname.
/nick Joeker
- Use the /create command to create a room.
- Use the /join command to join a room.
- Use the /leave command to leave a room.
- Use the /private command to send a private message to a user.
- Use the /public command to send a public message to all users.
- Use the /help command to get help.
- Use the /exit command to exit the chat.
- Create room and join room.
- Help command.