What is the difference between the point-to-point WEB program and the HTTP protocol when transmitting data? Today, I saw such an interview on the Internet, which triggered a series of online knowledge searches and reviews ...... As we all know, http is a network application layer protocol, while TCP/IP is a network transport layer protocol. The two have different layers and there is no way to compare them. However, I personally think that the highlight of this question is not the difference between the two protocols, but the point-to-point data transmission between the two Web programs. Which protocol is used? Let's not talk about the differences and connections between the two protocols. We reference a message from the Internet: When we transmit data, we can only use the (Transport Layer) TCP/IP protocol, however, if there is no application layer, the data content cannot be identified. If you want to make the transmitted data meaningful, you must use the application layer protocol. There are many application layer protocols, for example, HTTP, FTP, and TELNET, you can also customize the application layer protocol. The WEB uses HTTP as the application layer protocol to encapsulate HTTP text information, and then uses TCP/IP as the transport layer protocol to send it to the network.
Which protocol does the two Web programs use to transmit data point to point? Let's take a look at some descriptions and features of the http protocol: www.2cto.com
1. the HTTP Protocol (HyperText Transfer Protocol) is a Transfer Protocol used to transmit HyperText from the WWW server to a local browser. It makes the browser more efficient and reduces network transmission. It not only ensures that the computer transfers hypertext documents correctly and quickly, but also determines which part of the transmitted documents and which part of the content is first displayed (such as text before graphics. 2. the HTTP protocol is usually carried over the TCP protocol, and sometimes over the TLS or SSL protocol layer. At this time, we often say HTTPS.
3. the http protocol always initiates a request from the client, and the server sends a response.
In this way, when the client cannot initiate a request using the http protocol, the server pushes messages to the client. Therefore, I have answered the question raised by the title of this article. Web programs cannot use the Http protocol to transmit data point-to-point. By acme_ltt