A simple multi-client chat application using Java socket programming.
- Supports multiple clients connected to a central server.
- Real-time message broadcasting.
- Simple text-based user interface for communication.
- Java Development Kit (JDK) 8 or later.
ChatApp/
βββ ChatServer.java
βββ ChatClient.java
βββ README.md
- Compile the code:
javac ChatServer.java ChatClient.java- Start the Chat Server:
java ChatServer- Start the Chat Clients: (Open multiple terminals)
java ChatClient- Chat away!
- The
ChatServerlistens for client connections on port12345. - Each client sends and receives messages via
ChatClient. - Messages are broadcasted to all connected clients.
Client 1: Hello, everyone!
Client 2: Hi there!
Client 3: Welcome to the chat!
- Ensure the server starts before any client.
- Customize the port by modifying the
PORTconstant.
- Developed by [David Oke (Mr Iridescent)]