diff src/event/quic/ngx_event_quic_streams.c @ 8820: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
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_streams.c
+++ b/src/event/quic/ngx_event_quic_streams.c
@@ -584,12 +584,11 @@ ngx_quic_stream_send_chain(ngx_connectio
     }
 
     frame->level = ssl_encryption_application;
-    frame->type = NGX_QUIC_FT_STREAM6; /* OFF=1 LEN=1 FIN=0 */
+    frame->type = NGX_QUIC_FT_STREAM;
     frame->u.stream.off = 1;
     frame->u.stream.len = 1;
     frame->u.stream.fin = 0;
 
-    frame->u.stream.type = frame->type;
     frame->u.stream.stream_id = qs->id;
     frame->u.stream.offset = c->sent;
     frame->u.stream.length = n;
@@ -755,12 +754,11 @@ ngx_quic_stream_cleanup_handler(void *da
     }
 
     frame->level = ssl_encryption_application;
-    frame->type = NGX_QUIC_FT_STREAM7; /* OFF=1 LEN=1 FIN=1 */
+    frame->type = NGX_QUIC_FT_STREAM;
     frame->u.stream.off = 1;
     frame->u.stream.len = 1;
     frame->u.stream.fin = 1;
 
-    frame->u.stream.type = frame->type;
     frame->u.stream.stream_id = qs->id;
     frame->u.stream.offset = c->sent;
     frame->u.stream.length = 0;