Tcp,http,socket,websocket protocol

Source: Internet
Author: User

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

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.