WebSocket is a protocol which allows for communication between the client and the server/endpoint using a single TCP connection.
WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application.
This topic about the Java APIs for websockets that were developed by JSR 356 and incorporated into the Java EE 7 specifications.