comparison src/event/quic/ngx_event_quic.c @ 8791:af33d1ef1c3c quic

QUIC: stream flow control refactored. - Function ngx_quic_control_flow() is introduced. This functions does both MAX_DATA and MAX_STREAM_DATA flow controls. The function is called from STREAM and RESET_STREAM frame handlers. Previously, flow control was only accounted for STREAM. Also, MAX_DATA flow control was not accounted at all. - Function ngx_quic_update_flow() is introduced. This function advances flow control windows and sends MAX_DATA/MAX_STREAM_DATA. The function is called from RESET_STREAM frame handler, stream cleanup handler and stream recv() handler.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 07 Jun 2021 10:12:46 +0300
parents b3f6ad181df4
children 004172345bdc
comparison
equal deleted inserted replaced
8790:ac0398da8f23 8791:af33d1ef1c3c
301 ctp->ack_delay_exponent = NGX_QUIC_DEFAULT_ACK_DELAY_EXPONENT; 301 ctp->ack_delay_exponent = NGX_QUIC_DEFAULT_ACK_DELAY_EXPONENT;
302 ctp->max_ack_delay = NGX_QUIC_DEFAULT_MAX_ACK_DELAY; 302 ctp->max_ack_delay = NGX_QUIC_DEFAULT_MAX_ACK_DELAY;
303 ctp->active_connection_id_limit = 2; 303 ctp->active_connection_id_limit = 2;
304 304
305 qc->streams.recv_max_data = qc->tp.initial_max_data; 305 qc->streams.recv_max_data = qc->tp.initial_max_data;
306 qc->streams.recv_window = qc->streams.recv_max_data;
306 307
307 qc->streams.client_max_streams_uni = qc->tp.initial_max_streams_uni; 308 qc->streams.client_max_streams_uni = qc->tp.initial_max_streams_uni;
308 qc->streams.client_max_streams_bidi = qc->tp.initial_max_streams_bidi; 309 qc->streams.client_max_streams_bidi = qc->tp.initial_max_streams_bidi;
309 310
310 qc->congestion.window = ngx_min(10 * qc->tp.max_udp_payload_size, 311 qc->congestion.window = ngx_min(10 * qc->tp.max_udp_payload_size,