HTTP2.0 Binary Sub-frame

Source: Internet
Author: User

1. Type of frame:

In the binary frame structure, the head has 8 bytes (64Bit), which has one byte (8Bit) to mark the type of frame:

HTTP2.0 Specifies the following frame types:

DATA: For transmitting HTTP message body headers: The user transmits additional header fields about the stream priority: the user specifies or re-specifies the precedence of the reference resource rst_string: abnormal termination for notification flow settings: Data configuration for notifying both ends of communication push_promise: used to emit an offer to create a stream and a server reference resource ping: used to calculate round-trip time, perform an "activity" check Goaway: Used to notify the peer to stop creating flow window_update on the current connection: used to implement traffic control for individual streams or individual connections continuation: For continuing a series of header block fragments

1.1 Creating a new stream

The client creates a new stream by sending a headers frame that contains a public header with a new stream ID, an optional 31-bit priority, and a set of HTTP key-value pairs headers.

The server initiates a push stream by sending a push_promise frame, which is equivalent to the headers frame, but it contains an "offer flow ID" with no precedence.

Note: Because the metadata for the stream is sent separately from the app data, the client and server can prioritize them differently. For example, the flow priority of flow control can be higher,

But only apply it to the data frame

1.2 Sending Application Data

After creating a new stream and sending an HTTP header, the next step is to send the application data using the data frame. The application data can be divided into multiple data frames, and the last frame flips the header's End_stream field.

HTTP2.0 Binary Sub-frame

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.