Mercurial > hg > nginx-quic
comparison src/http/v3/ngx_http_v3.h @ 8823:6434160b4b78 quic
QUIC: allowed main QUIC connection for some operations.
Operations like ngx_quic_open_stream(), ngx_http_quic_get_connection(),
ngx_http_v3_finalize_connection(), ngx_http_v3_shutdown_connection() used to
receive a QUIC stream connection. Now they can receive the main QUIC
connection as well. This is useful when calling them from a stream context.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 31 Jan 2022 09:16:47 +0300 |
parents | 3d0fc72d409e |
children | efbcdb9b37dc |
comparison
equal
deleted
inserted
replaced
8822:30cad5a0931e | 8823:6434160b4b78 |
---|---|
76 #define NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR 0x201 | 76 #define NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR 0x201 |
77 #define NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR 0x202 | 77 #define NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR 0x202 |
78 | 78 |
79 | 79 |
80 #define ngx_http_quic_get_connection(c) \ | 80 #define ngx_http_quic_get_connection(c) \ |
81 ((ngx_http_connection_t *) (c)->quic->parent->data) | 81 ((ngx_http_connection_t *) ((c)->quic ? (c)->quic->parent->data \ |
82 : (c)->data)) | |
82 | 83 |
83 #define ngx_http_v3_get_session(c) ngx_http_quic_get_connection(c)->v3_session | 84 #define ngx_http_v3_get_session(c) ngx_http_quic_get_connection(c)->v3_session |
84 | 85 |
85 #define ngx_http_v3_get_module_loc_conf(c, module) \ | 86 #define ngx_http_v3_get_module_loc_conf(c, module) \ |
86 ngx_http_get_module_loc_conf(ngx_http_quic_get_connection(c)->conf_ctx, \ | 87 ngx_http_get_module_loc_conf(ngx_http_quic_get_connection(c)->conf_ctx, \ |
89 #define ngx_http_v3_get_module_srv_conf(c, module) \ | 90 #define ngx_http_v3_get_module_srv_conf(c, module) \ |
90 ngx_http_get_module_srv_conf(ngx_http_quic_get_connection(c)->conf_ctx, \ | 91 ngx_http_get_module_srv_conf(ngx_http_quic_get_connection(c)->conf_ctx, \ |
91 module) | 92 module) |
92 | 93 |
93 #define ngx_http_v3_finalize_connection(c, code, reason) \ | 94 #define ngx_http_v3_finalize_connection(c, code, reason) \ |
94 ngx_quic_finalize_connection(c->quic->parent, code, reason) | 95 ngx_quic_finalize_connection((c)->quic ? (c)->quic->parent : (c), \ |
96 code, reason) | |
95 | 97 |
96 #define ngx_http_v3_shutdown_connection(c, code, reason) \ | 98 #define ngx_http_v3_shutdown_connection(c, code, reason) \ |
97 ngx_quic_shutdown_connection(c->quic->parent, code, reason) | 99 ngx_quic_shutdown_connection((c)->quic ? (c)->quic->parent : (c), \ |
100 code, reason) | |
98 | 101 |
99 | 102 |
100 typedef struct { | 103 typedef struct { |
101 size_t max_table_capacity; | 104 size_t max_table_capacity; |
102 ngx_uint_t max_blocked_streams; | 105 ngx_uint_t max_blocked_streams; |