diff src/http/modules/ngx_http_quic_module.h @ 8769:9ec3e71f8a61 quic

HTTP/3: reference h3c directly from ngx_http_connection_t. Previously, an ngx_http_v3_connection_t object was created for HTTP/3 and then assinged to c->data instead of the generic ngx_http_connection_t object. Now a direct reference is added to ngx_http_connection_t, which is less confusing and does not require a flag for http3.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 05 May 2021 14:53:36 +0300
parents 554e11a325a9
children 606bf52888d2
line wrap: on
line diff
--- a/src/http/modules/ngx_http_quic_module.h
+++ b/src/http/modules/ngx_http_quic_module.h
@@ -18,6 +18,10 @@
 #define NGX_HTTP_QUIC_ALPN_DRAFT_FMT  "\x05hq-%02uD"
 
 
+#define ngx_http_quic_get_connection(c)                                       \
+    ((ngx_http_connection_t *) (c)->quic->parent->data)
+
+
 ngx_int_t ngx_http_quic_init(ngx_connection_t *c);