Mercurial > hg > nginx-quic
comparison src/event/quic/ngx_event_quic_streams.c @ 8545:4009f120cad4 quic
QUIC: eliminated stream type from ngx_quic_stream_frame_t.
The information about the type is contained in off/len/fin bits.
Also, where possible, only the first stream type (0x08) is used for simplicity.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 28 Jul 2021 13:21:47 +0300 |
parents | 4715f3e669f1 |
children | fe919fd63b0b |
comparison
equal
deleted
inserted
replaced
8544:d0ef43a53a51 | 8545:4009f120cad4 |
---|---|
582 while (in && ngx_buf_size(in->buf) == 0) { | 582 while (in && ngx_buf_size(in->buf) == 0) { |
583 in = in->next; | 583 in = in->next; |
584 } | 584 } |
585 | 585 |
586 frame->level = ssl_encryption_application; | 586 frame->level = ssl_encryption_application; |
587 frame->type = NGX_QUIC_FT_STREAM6; /* OFF=1 LEN=1 FIN=0 */ | 587 frame->type = NGX_QUIC_FT_STREAM; |
588 frame->u.stream.off = 1; | 588 frame->u.stream.off = 1; |
589 frame->u.stream.len = 1; | 589 frame->u.stream.len = 1; |
590 frame->u.stream.fin = 0; | 590 frame->u.stream.fin = 0; |
591 | 591 |
592 frame->u.stream.type = frame->type; | |
593 frame->u.stream.stream_id = qs->id; | 592 frame->u.stream.stream_id = qs->id; |
594 frame->u.stream.offset = c->sent; | 593 frame->u.stream.offset = c->sent; |
595 frame->u.stream.length = n; | 594 frame->u.stream.length = n; |
596 | 595 |
597 c->sent += n; | 596 c->sent += n; |
753 if (frame == NULL) { | 752 if (frame == NULL) { |
754 goto done; | 753 goto done; |
755 } | 754 } |
756 | 755 |
757 frame->level = ssl_encryption_application; | 756 frame->level = ssl_encryption_application; |
758 frame->type = NGX_QUIC_FT_STREAM7; /* OFF=1 LEN=1 FIN=1 */ | 757 frame->type = NGX_QUIC_FT_STREAM; |
759 frame->u.stream.off = 1; | 758 frame->u.stream.off = 1; |
760 frame->u.stream.len = 1; | 759 frame->u.stream.len = 1; |
761 frame->u.stream.fin = 1; | 760 frame->u.stream.fin = 1; |
762 | 761 |
763 frame->u.stream.type = frame->type; | |
764 frame->u.stream.stream_id = qs->id; | 762 frame->u.stream.stream_id = qs->id; |
765 frame->u.stream.offset = c->sent; | 763 frame->u.stream.offset = c->sent; |
766 frame->u.stream.length = 0; | 764 frame->u.stream.length = 0; |
767 | 765 |
768 ngx_quic_queue_frame(qc, frame); | 766 ngx_quic_queue_frame(qc, frame); |