Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

💬 Java Chat App

A real-time chat system built using Java Sockets and Multithreading, inspired by modern messaging platforms like Discord.

📌 Overview

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.


📂 Structure

chatapp
│
├── client
│   ├── ChatClient.java
│   └── MessageListener.java
│
├── server
│   ├── ChatServer.java
│   └── ClientHandler.java
│
└── common
    └── Constants.java

⚙️ Technologies Used

Technology Purpose
☕ Java Core programming language
🌐 TCP Sockets Network communication
🧵 Multithreading Handling multiple clients simultaneously
💻 CLI User interaction

🚀 How to Run

1️⃣ Compile the project

javac common/*.java server/*.java client/*.java

2️⃣ Start the server

java server.ChatServer

3️⃣ Start the client

java client.ChatClient

Note: Open multiple terminals and run the client program to simulate multiple users chatting simultaneously.


📈 Future Improvements

  • 👤 User authentication system
  • 💬 Private messaging
  • 🏠 Chat rooms / channels
  • 📂 File sharing support
  • 🎨 GUI using JavaFX or Swing
  • 🗄️ Message history with database
  • 🔐 End-to-end encryption

📷 Output Example

Client 1: Hello everyone!
Client 2: Hi! How are you?
Client 3: Welcome to our chat discord.


Create with 💙!

About

A multithreaded client-server chat system in Java enabling real-time messaging.

Topics

Resources

Code of conduct

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages