Nginx HTTP2 Source Analysis

Source: Internet
Author: User



Static ngx_chain_t *
Ngx_http_v2_send_chain (ngx_connection_t *fc, ngx_chain_t *in, off_t limit)


Process of the daytime:

1 Find the first non-empty buf in the current chain;

2 without a non-empty buf, return directly (. );

3 if the current Stream Send window is not greater than 0 or the current HTTP2 connection send window equals 0, return directly;

4 (. )

5 Set the threshold for sending direct data;

6 Set this frame size;

7 If the frame size is greater than the data threshold, set the frame size to the data threshold value;

8 times Calendar chain, constructs one output chain, each chain buf size is a frame size, then constructs each chain the HTTP2 frame;

9 Call the Send interface, send the constructed each HTTP2 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.