
JSocket ๐
A lightweight, easy-to-understand Java WebSocket server for real-time applications
JSocket provides a simple yet powerful WebSocket implementation in Java with no external dependencies. Perfect for learning WebSocket internals, building custom real-time features, or integrating into existing Java applications.
Video Below is just an example of what the JSocket can do
โจ Features
Beginner-friendly code structure with extensive documentation
RFC 6455 compliant WebSocket implementation
Concurrent client handling with dedicated reader/writer threads
Event-driven architecture via simple listener interface
Working Chess game demo showcasing real-time capabilities
Zero external dependencies - just pure Java
๐ Quick Start
Run the Chess Demo
Use JSocket in Your Project
1๏ธโฃ Copy the core files from
javaWebsocketChess/websocketCore/ into your project2๏ธโฃ Create your handler:
3๏ธโฃ Start the server:
๐งฉ Key Components
JSocket's architecture is simple but powerful:
WebSocketServer: Manages TCP connections and handshakesClientHandler: Manages WebSocket connection lifecycleWebSocketDataReader/Writer: Handle frame reading/writingWebSocketFrame: Represents WebSocket protocol framesWebSocketListener: Interface for your application logic๐ Use Cases
Learning WebSocket internals without complex dependencies
Real-time chat applications
Multiplayer games (like the included Chess demo)
Live dashboards and monitoring tools
Adding WebSocket capability to existing Java applications
๐ Documentation
For more detailed information:
how it works - Detailed description of classes and methods
๐ค Contributing
Contributions are welcome! Whether it's bug reports, feature requests, or code contributions:
Fork the repository
Create your feature branch:
git checkout -b feature/amazing-featureCommit your changes:
git commit -m 'Add some amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
๐ License
JSocket is MIT licensed.
Developed with โค๏ธ for the craft of developing
๐ Acknowledgements
Special thanks to the amazing python-websockets/websockets project for their wonderful documentation, which was invaluable in creating this repository.
2 likes ยท 38 views ยท Jul 18, 2025
Developed JSocket, a lightweight Java WebSocket server.