]> git.kaiwu.me - nginx.git/commit
Common tree insert function for QUIC and UDP connections.
authorRoman Arutyunyan <arut@nginx.com>
Sun, 14 May 2023 08:30:11 +0000 (12:30 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Sun, 14 May 2023 08:30:11 +0000 (12:30 +0400)
commit0a3c79614521d7612b63eff4e09c25ed219fb65b
treec2a0827a7e914aacd3b6924e233fbedbffcc319f
parent779bfcff5f7544494c7c85ac73f41a033e749528
Common tree insert function for QUIC and UDP connections.

Previously, ngx_udp_rbtree_insert_value() was used for plain UDP and
ngx_quic_rbtree_insert_value() was used for QUIC.  Because of this it was
impossible to initialize connection tree in ngx_create_listening() since
this function is not aware what kind of listening it creates.

Now ngx_udp_rbtree_insert_value() is used for both QUIC and UDP.  To make
is possible, a generic key field is added to ngx_udp_connection_t.  It keeps
client address for UDP and connection ID for QUIC.
src/core/ngx_connection.c
src/event/ngx_event_udp.c
src/event/ngx_event_udp.h
src/event/quic/ngx_event_quic.h
src/event/quic/ngx_event_quic_socket.c
src/event/quic/ngx_event_quic_udp.c
src/http/ngx_http.c
src/stream/ngx_stream.c