This repository contains a simple WebSocket server implemented in Java. The server establishes a single WebSocket connection, performs the necessary handshake, and handles basic message communication.
WebSockets provide a full-duplex communication channel over a single TCP connection. This example demonstrates how to set up a WebSocket server that can accept one connection, perform the WebSocket handshake, and exchange messages with a client.
- Establish a WebSocket connection
- Perform WebSocket handshake
- Receive and send messages
- Close the connection gracefully
- Java 8 or higher
- A WebSocket client for testing (e.g., Postman, a web browser, or a custom client)
--> https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers