maskit commented on code in PR #9864:
URL: https://github.com/apache/trafficserver/pull/9864#discussion_r1232527100


##########
proxy/http3/Http3FrameDispatcher.cc:
##########
@@ -95,13 +96,23 @@ Http3FrameDispatcher::on_read_ready(QUICStreamId stream_id, 
IOBufferReader &read
       if (frame == nullptr) {
         break;
       }
+      ++frame_count;
 
       // Consume buffer if frame is created
       nread += frame_len;
       reader.consume(frame_len);
 
       // Dispatch
       Http3FrameType type = frame->type();
+      if (stream_type == Http3StreamType::CONTROL) {

Review Comment:
   Can you put this into a private function? This block will be very long 
eventually. For example, we also need to check this:
   
   > If a DATA frame is received on a control stream, the recipient MUST 
respond with a connection error of type H3_FRAME_UNEXPECTED.
   
   I was going to make `ProtocolEnforcer` that inherits `FrameHandler` and 
handle all frame types (as you can see we can have multiple frame handlers for 
a frame type). With the enforcer, a dispatcher can focus on dispatching. The 
Single Responsibility Principle.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to