Mercurial > hg > nginx-quic
comparison src/event/quic/ngx_event_quic_transport.c @ 8322:44b4c6180106 quic
QUIC: multiple versions support.
Draft-29 and beyond are now supported simultaneously, no need to recompile.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 19 Feb 2021 17:27:19 +0300 |
parents | 81bb3a690c10 |
children | 47e0009e53a7 |
comparison
equal
deleted
inserted
replaced
8321:81bb3a690c10 | 8322:44b4c6180106 |
---|---|
124 static ngx_int_t ngx_quic_parse_transport_param(u_char *p, u_char *end, | 124 static ngx_int_t ngx_quic_parse_transport_param(u_char *p, u_char *end, |
125 uint16_t id, ngx_quic_tp_t *dst); | 125 uint16_t id, ngx_quic_tp_t *dst); |
126 | 126 |
127 | 127 |
128 uint32_t ngx_quic_versions[] = { | 128 uint32_t ngx_quic_versions[] = { |
129 #if (NGX_QUIC_DRAFT_VERSION >= 33) | |
130 /* QUICv1 */ | 129 /* QUICv1 */ |
131 0x00000001, | 130 0x00000001, |
132 NGX_QUIC_VERSION(33), | |
133 #else | |
134 NGX_QUIC_VERSION(29), | 131 NGX_QUIC_VERSION(29), |
135 NGX_QUIC_VERSION(30), | 132 NGX_QUIC_VERSION(30), |
136 NGX_QUIC_VERSION(31), | 133 NGX_QUIC_VERSION(31), |
137 NGX_QUIC_VERSION(32), | 134 NGX_QUIC_VERSION(32), |
138 #endif | |
139 }; | 135 }; |
140 | 136 |
141 #define NGX_QUIC_NVERSIONS \ | 137 #define NGX_QUIC_NVERSIONS \ |
142 (sizeof(ngx_quic_versions) / sizeof(ngx_quic_versions[0])) | 138 (sizeof(ngx_quic_versions) / sizeof(ngx_quic_versions[0])) |
143 | 139 |