comparison src/event/quic/ngx_event_quic_socket.c @ 9017:c2f5d79cde64 quic

QUIC: separate UDP framework for QUIC. Previously, QUIC used the existing UDP framework, which was created for UDP in Stream. However the way QUIC connections are created and looked up is different from the way UDP connections in Stream are created and looked up. Now these two implementations are decoupled.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 20 Apr 2022 16:01:17 +0400
parents a2fbae359828
children adcc6d8acfd4
comparison
equal deleted inserted replaced
9016:55b38514729b 9017:c2f5d79cde64
175 sid = &qsock->sid; 175 sid = &qsock->sid;
176 176
177 id.data = sid->id; 177 id.data = sid->id;
178 id.len = sid->len; 178 id.len = sid->len;
179 179
180 ngx_insert_udp_connection(c, &qsock->udp, &id); 180 qsock->udp.connection = c;
181 qsock->udp.node.key = ngx_crc32_long(id.data, id.len);
182
183 ngx_rbtree_insert(&c->listening->rbtree, &qsock->udp.node);
181 184
182 ngx_queue_insert_tail(&qc->sockets, &qsock->queue); 185 ngx_queue_insert_tail(&qc->sockets, &qsock->queue);
183 186
184 qc->nsockets++; 187 qc->nsockets++;
185 qsock->quic = qc; 188 qsock->quic = qc;