Home  >  Q&A  >  body text

html5 - websocket为什么只需一次握手

为什么不需要二次三次握手的确认呢

PHP中文网PHP中文网2766 days ago641

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 14:31:03

    In the end, the tcp protocol was adopted, or the three-way handshake

    http and websocket protocols are application layer protocols based on the transport layer tcp protocol

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 14:31:03

    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.

    reply
    0
  • 阿神

    阿神2017-04-17 14:31:03

    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

    reply
    0
  • Cancelreply