WebSocket
WebSocket is a TCP-based network protocol. In contrast to the stateless HTTP protocol, WebSocket enables a permanent bidirectional connection between server and client.

A WebSocket connection is created from a WebSocket handshake. In this WebSocket handshake, an HTTP GET request is first sent to the server, which contains information about an update of this connection. If the server supports WebSocket connections and accepts the request, an HTTP response with the status code 101 Switching Protocols is sent back to the client. Once the handshake is complete, the system switches from HTTP to WebSocket.
In contrast to the HTTP protocol, both the client and the server can send data to each other without prior request once a connection has been established. Both communication participants can also terminate the connection again.
The WebSocket protocol is used, for example, in chat applications, online games or live sports tickers. In the example of the live sports ticker, the server can communicate updates to the connected client without the client always having to send a request as with HTTP.