mirror of
https://github.com/nginx/nginx.git
synced 2025-08-06 14:56:15 +08:00
MAX_DATA frame parser/handler.
This commit is contained in:
parent
33d8317dd5
commit
31e794f0ad
@ -42,6 +42,7 @@ struct ngx_quic_connection_s {
|
|||||||
ngx_quic_frame_t *frames;
|
ngx_quic_frame_t *frames;
|
||||||
|
|
||||||
ngx_quic_streams_t streams;
|
ngx_quic_streams_t streams;
|
||||||
|
ngx_uint_t max_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -823,6 +824,16 @@ ngx_quic_payload_handler(ngx_connection_t *c, ngx_quic_header_t *pkt)
|
|||||||
ack_this = 1;
|
ack_this = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NGX_QUIC_FT_MAX_DATA:
|
||||||
|
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||||
|
"MAX_DATA frame"
|
||||||
|
" { Maximum Data %ui }",
|
||||||
|
frame.u.max_data.max_data);
|
||||||
|
|
||||||
|
c->quic->max_data = frame.u.max_data.max_data;
|
||||||
|
ack_this = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case NGX_QUIC_FT_RESET_STREAM:
|
case NGX_QUIC_FT_RESET_STREAM:
|
||||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||||
"RESET STREAM frame"
|
"RESET STREAM frame"
|
||||||
|
@ -424,6 +424,10 @@ ngx_quic_parse_frame(u_char *start, u_char *end, ngx_quic_frame_t *frame)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NGX_QUIC_FT_MAX_DATA:
|
||||||
|
frame->u.max_data.max_data = ngx_quic_parse_int(&p);
|
||||||
|
break;
|
||||||
|
|
||||||
case NGX_QUIC_FT_RESET_STREAM:
|
case NGX_QUIC_FT_RESET_STREAM:
|
||||||
frame->u.reset_stream.id = ngx_quic_parse_int(&p);
|
frame->u.reset_stream.id = ngx_quic_parse_int(&p);
|
||||||
frame->u.reset_stream.error_code = ngx_quic_parse_int(&p);
|
frame->u.reset_stream.error_code = ngx_quic_parse_int(&p);
|
||||||
|
@ -109,6 +109,11 @@ typedef struct {
|
|||||||
} ngx_quic_stream_frame_t;
|
} ngx_quic_stream_frame_t;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint64_t max_data;
|
||||||
|
} ngx_quic_max_data_frame_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t error_code;
|
uint64_t error_code;
|
||||||
uint64_t frame_type;
|
uint64_t frame_type;
|
||||||
@ -146,6 +151,7 @@ struct ngx_quic_frame_s {
|
|||||||
ngx_quic_crypto_frame_t crypto;
|
ngx_quic_crypto_frame_t crypto;
|
||||||
ngx_quic_new_conn_id_frame_t ncid;
|
ngx_quic_new_conn_id_frame_t ncid;
|
||||||
ngx_quic_stream_frame_t stream;
|
ngx_quic_stream_frame_t stream;
|
||||||
|
ngx_quic_max_data_frame_t max_data;
|
||||||
ngx_quic_close_frame_t close;
|
ngx_quic_close_frame_t close;
|
||||||
ngx_quic_reset_stream_frame_t reset_stream;
|
ngx_quic_reset_stream_frame_t reset_stream;
|
||||||
ngx_quic_stop_sending_frame_t stop_sending;
|
ngx_quic_stop_sending_frame_t stop_sending;
|
||||||
|
Loading…
Reference in New Issue
Block a user