Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rishmi5h/broadcast-server
https://github.com/rishmi5h/broadcast-server
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rishmi5h/broadcast-server
- Owner: rishmi5h
- Created: 2024-09-08T21:39:21.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T22:49:25.000Z (4 months ago)
- Last Synced: 2024-11-16T08:11:53.727Z (2 months ago)
- Language: Java
- Size: 553 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Broadcast Server
A simple Java-based broadcast server and client application.
## Files
1. **BroadcastApp.java**
- Main entry point
- Usage: `java BroadcastApp [start|connect]`2. **BroadcastServer.java**
- Implements server functionality
- Manages client connections and message broadcasting3. **BroadcastClient.java**
- Implements client functionality
- Connects to server, sends and receives messages4. **ClientHandler.java**
- Manages individual client connections on the server side
- Handles message reception and client disconnection## Setup
1. Compile: `javac *.java`
2. Start server: `java BroadcastApp start`
3. Connect client: `java BroadcastApp connect`## Features
- Multi-client support
- Real-time message broadcasting
- Graceful client disconnection
- Server shutdown hook## Usage
- Server runs on port 5005 by default
- Clients connect to localhost:5005
- Type 'exit' to disconnect a client## Note
Modify PORT in BroadcastApp.java to change the default port.
## Testing
- BroadcastServer
![server]()- BroadcastClient - 1
![client1]()- BroadcastClient - 2
![client2]()- BroadcastClient - 3
![client3]()[challenge](https://roadmap.sh/projects/broadcast-server)