WebSocket (4)--the relationship between WebSocket and TCP, HTTP

Source: Internet
Author: User

[This article is original, if reproduced, please indicate the source http://blog.csdn.net/yl02520/article/]

WebSocket is based on TCP like the HTTP protocol, so they are all reliable protocols, and the WebSocket send function that Web developers invoke is eventually transmitted through TCP's system interface in browser implementations. WebSocket and HTTP protocols are both application-level protocols, so what's the relationship between them? The answer is yes, websocket the data is transmitted over the HTTP protocol when creating a handshake connection, as we saw in the previous section, "Get/chat http/1.1", where only a few simple fields of the HTTP protocol are used. However, after the connection is established, the real data transfer phase is not required for HTTP protocol participation.

The specific relationship can refer to the following figure:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.