websocket握手阶段是通过什么协议传输的?

The WebSocket handshake is conducted over HTTP. Specifically, it uses an HTTP upgrade request. The client sends a regular HTTP request with specific headers indicating its desire to upgrade the connection to a WebSocket. If the server agrees, it responds with a specific HTTP response accepting the upgrade. After this handshake is complete, the connection switches to the WebSocket protocol.

posted @ 2024-12-07 10:05  王铁柱6  阅读(7)  评论(0)    收藏  举报