comparison src/stream/ngx_stream.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 d514f88053e5
children 113e2438dbd4
comparison
equal deleted inserted replaced
9016:55b38514729b 9017:c2f5d79cde64
517 #if (NGX_HAVE_REUSEPORT) 517 #if (NGX_HAVE_REUSEPORT)
518 ls->reuseport = addr[i].opt.reuseport; 518 ls->reuseport = addr[i].opt.reuseport;
519 #endif 519 #endif
520 520
521 #if (NGX_STREAM_QUIC) 521 #if (NGX_STREAM_QUIC)
522
522 ls->quic = addr[i].opt.quic; 523 ls->quic = addr[i].opt.quic;
523 #endif 524
525 if (ls->quic) {
526 ngx_rbtree_init(&ls->rbtree, &ls->sentinel,
527 ngx_quic_rbtree_insert_value);
528 }
529
530 #endif
531
532 #if !(NGX_WIN32)
533 if (!ls->quic) {
534 ngx_rbtree_init(&ls->rbtree, &ls->sentinel,
535 ngx_udp_rbtree_insert_value);
536 }
537 #endif
538
524 stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t)); 539 stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t));
525 if (stport == NULL) { 540 if (stport == NULL) {
526 return NGX_CONF_ERROR; 541 return NGX_CONF_ERROR;
527 } 542 }
528 543