comparison src/event/ngx_event_quic_transport.h @ 8657:2dfc5ef29973 quic

QUIC: introduced QUIC buffers. Buffers are used to hold frame data. They have a fixed size and are reused after being freed.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 01 Dec 2020 19:11:01 +0000
parents 5fdd0ef42232
children
comparison
equal deleted inserted replaced
8656:43f3574b3e6f 8657:2dfc5ef29973
142 uint64_t range_count; 142 uint64_t range_count;
143 uint64_t first_range; 143 uint64_t first_range;
144 uint64_t ect0; 144 uint64_t ect0;
145 uint64_t ect1; 145 uint64_t ect1;
146 uint64_t ce; 146 uint64_t ce;
147 u_char *ranges_start; 147 uint64_t ranges_length;
148 u_char *ranges_end;
149 } ngx_quic_ack_frame_t; 148 } ngx_quic_ack_frame_t;
150 149
151 150
152 typedef struct { 151 typedef struct {
153 uint64_t seqnum; 152 uint64_t seqnum;
169 * frame lacking some properties 168 * frame lacking some properties
170 */ 169 */
171 typedef struct { 170 typedef struct {
172 uint64_t offset; 171 uint64_t offset;
173 uint64_t length; 172 uint64_t length;
174 u_char *data;
175 } ngx_quic_ordered_frame_t; 173 } ngx_quic_ordered_frame_t;
176 174
177 typedef ngx_quic_ordered_frame_t ngx_quic_crypto_frame_t; 175 typedef ngx_quic_ordered_frame_t ngx_quic_crypto_frame_t;
178 176
179 177
180 typedef struct { 178 typedef struct {
181 /* initial fields same as in ngx_quic_ordered_frame_t */ 179 /* initial fields same as in ngx_quic_ordered_frame_t */
182 uint64_t offset; 180 uint64_t offset;
183 uint64_t length; 181 uint64_t length;
184 u_char *data;
185 182
186 uint8_t type; 183 uint8_t type;
187 uint64_t stream_id; 184 uint64_t stream_id;
188 unsigned off:1; 185 unsigned off:1;
189 unsigned len:1; 186 unsigned len:1;
268 ngx_msec_t last; 265 ngx_msec_t last;
269 ssize_t len; 266 ssize_t len;
270 ngx_uint_t need_ack; 267 ngx_uint_t need_ack;
271 /* unsigned need_ack:1; */ 268 /* unsigned need_ack:1; */
272 269
273 u_char *data; 270 ngx_chain_t *data;
274 union { 271 union {
275 ngx_quic_ack_frame_t ack; 272 ngx_quic_ack_frame_t ack;
276 ngx_quic_crypto_frame_t crypto; 273 ngx_quic_crypto_frame_t crypto;
277 ngx_quic_ordered_frame_t ord; 274 ngx_quic_ordered_frame_t ord;
278 ngx_quic_new_conn_id_frame_t ncid; 275 ngx_quic_new_conn_id_frame_t ncid;