WebSocket is a computer communications protocol, providing full-duplex communication channels over 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. The WebSocket Protocol is an independent TCP-based protocol. Its only relationship to HTTP is that its handshake is interpreted by HTTP servers as an Upgrade request.
The WebSocket protocol makes more interaction between a browser and a web server possible, facilitating the real-time data transfer from and to the server.