Skip to content

mirzaim/java-chatroom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

A simple chatroom application built using Java.

Topics

Resources

License

Stars

Watchers

Forks

Languages