A real-time, socket-based chat application developed using TCP communication. This project supports multiple clients connecting to a central server, enabling public group chats, private rooms, one-to-one messaging, and file sharing between users.
This project was developed as part of the Computer Networks course and is designed to simulate real-time communication via a TCP-based client-server architecture.
- β Client-Server Architecture using TCP Sockets
- π₯ Multiple Clients can connect simultaneously
- π¨οΈ Group Chat Room for all active users
- π Private Rooms with access key protection
- π¬ Private One-to-One Messaging between selected users
- π File Sharing among participants
- π§ Threaded Listener for continuous message reception
- π§Ύ Message Types & Routing via enums and message objects
- βοΈ Deployed on Amazon Web Services (AWS)
- Server Class: Listens for client connections, manages message routing, and broadcasts messages.
- Client Class: Connects to the server, sends messages, and listens for incoming communication via a dedicated thread.
- Message Class: Encapsulates message content, type, sender, and receiver.
- Enum Types: Used to define message categories (e.g.,
LOGIN
,GROUP_MSG
,PRIVATE_MSG
, etc.) - ArrayLists: Used for tracking connected clients, usernames, and active rooms.
- Java (Socket Programming)
- ObjectOutputStream / ObjectInputStream for message transmission
- Multi-threading for concurrent message handling
- Amazon Web Services (for deployment)