WebSocket is based on TCP, and the TCP handshake and the WebSocket handshake are at different levels.
The TCP handshake is used to ensure the establishment of the link. The WebSocket handshake tells the server that this is a WebSocket link after the TCP link is established. The server must handle this TCP link according to the WebSocket protocol.
Websocket is an application layer protocol, no different from SSL, HTTP, and FTP. TCP is a transport layer protocol that guarantees how data is transmitted. You should look at the network’s seven-layer protocol
In the end, the tcp protocol was adopted, or the three-way handshake
WebSocket is based on TCP, and the TCP handshake and the WebSocket handshake are at different levels.
The TCP handshake is used to ensure the establishment of the link. The WebSocket handshake tells the server that this is a WebSocket link after the TCP link is established. The server must handle this TCP link according to the WebSocket protocol.
Websocket is an application layer protocol, no different from SSL, HTTP, and FTP. TCP is a transport layer protocol that guarantees how data is transmitted. You should look at the network’s seven-layer protocol