comparison src/event/quic/ngx_event_quic.h @ 8987:1192923be0aa quic

QUIC: idle mode for main connection. Now main QUIC connection for HTTP/3 always has c->idle flag set. This allows the connection to receive worker shutdown notification. It is passed to application level via a new conf->shutdown() callback. The HTTP/3 shutdown callback sends GOAWAY to client and gracefully shuts down the QUIC connection.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 19 Oct 2022 17:45:18 +0400
parents 2e51cf3ffd90
children b0c2234aaa9f
comparison
equal deleted inserted replaced
8986:6546c2ae1c7b 8987:1192923be0aa
24 24
25 #define NGX_QUIC_MIN_INITIAL_SIZE 1200 25 #define NGX_QUIC_MIN_INITIAL_SIZE 1200
26 26
27 #define NGX_QUIC_STREAM_SERVER_INITIATED 0x01 27 #define NGX_QUIC_STREAM_SERVER_INITIATED 0x01
28 #define NGX_QUIC_STREAM_UNIDIRECTIONAL 0x02 28 #define NGX_QUIC_STREAM_UNIDIRECTIONAL 0x02
29
30
31 typedef void (*ngx_quic_shutdown_pt)(ngx_connection_t *c);
29 32
30 33
31 typedef enum { 34 typedef enum {
32 NGX_QUIC_STREAM_SEND_READY = 0, 35 NGX_QUIC_STREAM_SEND_READY = 0,
33 NGX_QUIC_STREAM_SEND_SEND, 36 NGX_QUIC_STREAM_SEND_SEND,
71 ngx_uint_t max_concurrent_streams_uni; 74 ngx_uint_t max_concurrent_streams_uni;
72 ngx_uint_t active_connection_id_limit; 75 ngx_uint_t active_connection_id_limit;
73 ngx_int_t stream_close_code; 76 ngx_int_t stream_close_code;
74 ngx_int_t stream_reject_code_uni; 77 ngx_int_t stream_reject_code_uni;
75 ngx_int_t stream_reject_code_bidi; 78 ngx_int_t stream_reject_code_bidi;
79
80 ngx_quic_shutdown_pt shutdown;
76 81
77 u_char av_token_key[NGX_QUIC_AV_KEY_LEN]; 82 u_char av_token_key[NGX_QUIC_AV_KEY_LEN];
78 u_char sr_token_key[NGX_QUIC_SR_KEY_LEN]; 83 u_char sr_token_key[NGX_QUIC_SR_KEY_LEN];
79 } ngx_quic_conf_t; 84 } ngx_quic_conf_t;
80 85