HTTP

WWW server <---------- hypertext ----------> local browserCopy the code

HyperText Transfer Protocol (HTTP) is used to Transfer HyperText from WWW server to local browser.

Job Description:

1. The client sends a request to the server. 2. Connection is closedCopy the code

Working process:

1. Address resolution When a client requests http://localhost.com:8080/index.html page, the page address resolution protocol name: HTTP host name: Localhost.com (the DNS resolves the domain name localhost.com to obtain the IP address.) Port: 8080 Object path: /index.htm 2 Data encapsulation 1. The HTTP request packet encapsulation will parse the information + the machine information -- -- -- -- -- -- -- -- -- -- - package -- -- -- -- -- -- -- > HTTP request data pack 2. Encapsulate TCP packets 3. Encapsulate IP packets 4. Encapsulate data frame 5. Through hardware, data frame ------------------->bit stream (binary data) 3. Through the physical hardware (nic chip), the bit stream is sent to the specified location. 4. Establish a TCP connection through the TCP three-way handshake. The client interacts with the server on request and Response 6. Close the TCP connection by waving the TCP wave four timesCopy the code

TCP/IP

Computer A<---------- hypertext ----------> Computer BCopy the code

Communication between two computers is carried out over the Internet through TCP/IP protocol

TCP/IP protocol

Responsible for communication between computers

1. Only send and receive messagesCopy the code

TCP protocol

Take care of the communication between applications (such as your browser) and web applications

1. Obtain the port number port from the IP address and check whether the data is received, the arrival sequence, and whether the data is modified. 2. The data is divided into IP packets for transmission, and then reassembled after deliveryCopy the code