Mercurial > hg > nginx-quic
comparison src/event/quic/ngx_event_quic.h @ 8385:9ce6d80df113 quic
QUIC: simplified quic connection dispatching.
Currently listener contains rbtree with multiple nodes for single QUIC
connection: each corresponding to specific server id. Each udp node points
to same ngx_connection_t, which points to QUIC connection via c->udp field.
Thus when an event handler is called, it only gets ngx_connection_t with
c->udp pointing to QUIC connection. This makes it hard to obtain actual
node which was used to dispatch packet (it requires to repeat DCID lookup).
Additionally, ngx_quic_connection_t->udp field is only needed to keep a
pointer in c->udp. The node is not added into the tree and does not carry
useful information.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 02 Apr 2021 11:31:37 +0300 |
parents | fc64ab301bad |
children | c8bda5e1e662 |
comparison
equal
deleted
inserted
replaced
8384:c61fcdc1b8e3 | 8385:9ce6d80df113 |
---|---|
62 | 62 |
63 #define NGX_QUIC_MAX_SERVER_IDS 8 | 63 #define NGX_QUIC_MAX_SERVER_IDS 8 |
64 | 64 |
65 #define NGX_QUIC_BUFFER_SIZE 4096 | 65 #define NGX_QUIC_BUFFER_SIZE 4096 |
66 | 66 |
67 #define ngx_quic_get_connection(c) ((ngx_quic_connection_t *)(c)->udp) | 67 #define ngx_quic_get_connection(c) \ |
68 (((c)->udp) ? (((ngx_quic_server_id_t *)((c)->udp))->quic) : NULL) | |
68 | 69 |
69 | 70 |
70 typedef struct { | 71 typedef struct { |
71 /* configurable */ | 72 /* configurable */ |
72 ngx_msec_t max_idle_timeout; | 73 ngx_msec_t max_idle_timeout; |