One. TCP protocol
1. Transport Layer Communication Protocol
2. Connection-oriented, reliable, byte-stream-based
3. Three handshake required to establish a link
4.TCP can guarantee that data is not lost, data is not out of sequence, data is error free, data is not repeated.
Two. HTTP protocol
1. An Application layer protocol
2.header-body composition
3. Higher than TCP advanced
4. Short link, no status
5.http Request Steps
①. The client establishes a TCP connection to the server through the TCP/IP protocol.
②. The client sends an HTTP request to the server.
③. The server sends an HTTP protocol reply packet to the client.
④. Break link, client renders HTML document.
Three. Socket protocol
1. One tool, one interface
2. Encapsulates the TCP/IP protocol.
3. Establish the basis for long links.
4. Three steps: Server monitoring, client request, connection confirmation.
Four. WebSocket Agreement
1. An application layer protocol.
2. Long links.
3. Mainstream instant messaging technology.
4. A lot more advantages than Ajax polling.
5.header is small, Serverpush is actively pushed to the client when there is new data for the server.
Tcp,http,socket,websocket protocol