Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic.h @ 9107:adcc6d8acfd4 quic
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Sun, 14 May 2023 12:30:11 +0400 |
parents | b9230e37b8a1 |
children | ad3d34ddfdcc |
comparison
equal
deleted
inserted
replaced
9106:113e2438dbd4 | 9107:adcc6d8acfd4 |
---|---|
109 unsigned fin_acked:1; | 109 unsigned fin_acked:1; |
110 }; | 110 }; |
111 | 111 |
112 | 112 |
113 void ngx_quic_recvmsg(ngx_event_t *ev); | 113 void ngx_quic_recvmsg(ngx_event_t *ev); |
114 void ngx_quic_rbtree_insert_value(ngx_rbtree_node_t *temp, | |
115 ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel); | |
116 void ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf); | 114 void ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf); |
117 ngx_connection_t *ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi); | 115 ngx_connection_t *ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi); |
118 void ngx_quic_finalize_connection(ngx_connection_t *c, ngx_uint_t err, | 116 void ngx_quic_finalize_connection(ngx_connection_t *c, ngx_uint_t err, |
119 const char *reason); | 117 const char *reason); |
120 void ngx_quic_shutdown_connection(ngx_connection_t *c, ngx_uint_t err, | 118 void ngx_quic_shutdown_connection(ngx_connection_t *c, ngx_uint_t err, |