A real-time chat system built using Java Sockets and Multithreading, inspired by modern messaging platforms like Discord.
This project implements a multithreaded client-server chat system that enables multiple clients to communicate with each other in real-time through a central server.
- ⚡ Real-time messaging
- 🧵 Multithreaded server for handling multiple clients
- 🔌 TCP socket communication
- 💻 Command-line based client interface
Each client connects to the server using TCP sockets.
The server creates a separate thread for every connected client, enabling simultaneous communication.
chatapp
│
├── client
│ ├── ChatClient.java
│ └── MessageListener.java
│
├── server
│ ├── ChatServer.java
│ └── ClientHandler.java
│
└── common
└── Constants.java
| Technology | Purpose |
|---|---|
| ☕ Java | Core programming language |
| 🌐 TCP Sockets | Network communication |
| 🧵 Multithreading | Handling multiple clients simultaneously |
| 💻 CLI | User interaction |
javac common/*.java server/*.java client/*.java
java server.ChatServer
java client.ChatClient
Note: Open multiple terminals and run the client program to simulate multiple users chatting simultaneously.
- 👤 User authentication system
- 💬 Private messaging
- 🏠 Chat rooms / channels
- 📂 File sharing support
- 🎨 GUI using JavaFX or Swing
- 🗄️ Message history with database
- 🔐 End-to-end encryption
Client 1: Hello everyone! Client 2: Hi! How are you? Client 3: Welcome to our chat discord.
Create with 💙!