A simple chatroom application built using Java. This project provides both the server and client implementations to facilitate real-time messaging between multiple clients over a network.
- Multi-client support
- Real-time message broadcasting
- Simple and modular code structure
- Separate client and server packages for clear organization
- Uses Java socket programming for communication
src/
└── com/chatroom
├── client # Client-side implementation
├── message # Message handling and protocols
└── server # Server-side implementation
- client: Contains the classes necessary for the chatroom clients to connect to the server and send/receive messages.
- message: Defines the structure and handling of messages exchanged between the server and clients.
- server: Implements the server that manages client connections and broadcasts messages to all connected clients.
- Navigate to the
src/com/chatroom/server
directory. - Compile the server code:
javac Server.java
- Run the server:
java Server
- Navigate to the
src/com/chatroom/client
directory. - Compile the client code:
javac Client.java
- Run the client:
java Client
- When prompted, enter the server's IP address and port number to connect.