Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.44 KB

README.md

File metadata and controls

52 lines (41 loc) · 1.44 KB

Java Chatroom

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.

Features

  • 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

Project Structure

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.

How to Run

Server

  1. Navigate to the src/com/chatroom/server directory.
  2. Compile the server code:
    javac Server.java
  3. Run the server:
     java Server

Client

  1. Navigate to the src/com/chatroom/client directory.
  2. Compile the client code:
    javac Client.java
  3. Run the client:
     java Client
  4. When prompted, enter the server's IP address and port number to connect.