Client-Server chatting application built using Java.
This project is a simple chat application that demonstrates basic client-server architecture using Java sockets. It allows multiple clients to connect to a server and exchange messages in real-time.
- Real-time messaging between clients
- Multi-client support via server threading
- Simple command-line interface for both client and server
- Easy setup and execution
- Java (100%)
- Java Development Kit (JDK) 8 or above
-
Clone the repository:
git clone https://github.com/Denzel-Awuah/chat-app.git cd chat-app -
Compile the code:
javac Server.java javac Client.java
Start the server first:
java ServerBy default, the server will listen on port 12345. You can modify the port in the code if needed.
Start one or more clients:
java ClientYou will be prompted to enter the server's IP address and port.
- Run the server.
- Launch clients and connect to the server.
- Each client can send messages that will be broadcast to all connected clients.
- Type messages and press Enter to send.
chat-app/
├── Server.java
├── Client.java
├── README.md
Pull requests are welcome. For significant changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.
Author: Denzel-Awuah