summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic.h
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2022-10-19 17:45:18 +0400
committerRoman Arutyunyan <arut@nginx.com>2022-10-19 17:45:18 +0400
commitfed44881d3bf5126b49144dba58f2830e0fe9866 (patch)
tree6137fc2bdbb276dfceb695f1f10bc674e44fa139 /src/event/quic/ngx_event_quic.h
parentdd4c31fc34bd8390dd3fa9e804afc15b57b69135 (diff)
downloadnginx-fed44881d3bf5126b49144dba58f2830e0fe9866.tar.gz
nginx-fed44881d3bf5126b49144dba58f2830e0fe9866.tar.bz2
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.
Diffstat (limited to 'src/event/quic/ngx_event_quic.h')
-rw-r--r--src/event/quic/ngx_event_quic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic.h b/src/event/quic/ngx_event_quic.h
index d33bd8d4d..335d925cb 100644
--- a/src/event/quic/ngx_event_quic.h
+++ b/src/event/quic/ngx_event_quic.h
@@ -28,6 +28,9 @@
#define NGX_QUIC_STREAM_UNIDIRECTIONAL 0x02
+typedef void (*ngx_quic_shutdown_pt)(ngx_connection_t *c);
+
+
typedef enum {
NGX_QUIC_STREAM_SEND_READY = 0,
NGX_QUIC_STREAM_SEND_SEND,
@@ -74,6 +77,8 @@ typedef struct {
ngx_int_t stream_reject_code_uni;
ngx_int_t stream_reject_code_bidi;
+ ngx_quic_shutdown_pt shutdown;
+
u_char av_token_key[NGX_QUIC_AV_KEY_LEN];
u_char sr_token_key[NGX_QUIC_SR_KEY_LEN];
} ngx_quic_conf_t;