Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 8097:a89a58c642ef quic
QUIC: simplified packet header parsing.
Now flags are processed in ngx_quic_input(), and raw->pos points to the first
byte after the flags. Redundant checks from ngx_quic_parse_short_header() and
ngx_quic_parse_long_header() are removed.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 25 Sep 2020 21:47:28 +0300 |
parents | 0f37b4ef3cd9 |
children | d0d3fc0697a0 |
comparison
equal
deleted
inserted
replaced
8096:0f37b4ef3cd9 | 8097:a89a58c642ef |
---|---|
1621 pkt.raw = b; | 1621 pkt.raw = b; |
1622 pkt.data = p; | 1622 pkt.data = p; |
1623 pkt.len = b->last - p; | 1623 pkt.len = b->last - p; |
1624 pkt.log = c->log; | 1624 pkt.log = c->log; |
1625 pkt.flags = p[0]; | 1625 pkt.flags = p[0]; |
1626 pkt.raw->pos++; | |
1626 | 1627 |
1627 if (c->quic->in_retry) { | 1628 if (c->quic->in_retry) { |
1628 rc = ngx_quic_retry_input(c, &pkt); | 1629 rc = ngx_quic_retry_input(c, &pkt); |
1629 | 1630 |
1630 } else if (ngx_quic_long_pkt(pkt.flags)) { | 1631 } else if (ngx_quic_long_pkt(pkt.flags)) { |