Loading src/quic.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -3882,7 +3882,7 @@ void quic::processFrame(const uint8_t* data, size_t len, size_t& offset, bool& a case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: // STREAM processStreamFrame(data, len, offset); processStreamFrame(data, len, offset, static_cast<uint8_t>(frame_type)); break; case 0x10: // MAX_DATA Loading Loading @@ -4275,11 +4275,13 @@ void quic::processCryptoFrame(const uint8_t* data, size_t len, size_t& offset) { // Frame Processing: STREAM Frame // ============================================================================ void quic::processStreamFrame(const uint8_t* data, size_t len, size_t& offset) { void quic::processStreamFrame(const uint8_t* data, size_t len, size_t& offset, uint8_t frame_type) { if (offset >= len) return; // The frame type encodes flags in bits 0-2 uint8_t frame_type = data[offset - 1]; // Already consumed type byte // The frame type encodes flags in bits 0-2 — passed in from processFrame(), // which already decoded it via decodeVarInt(), instead of re-deriving it // here from data[offset-1] (only correct because the type happens to be // single-byte-encoded; passing it down avoids relying on that). bool has_offset = (frame_type & 0x04) != 0; bool has_length = (frame_type & 0x02) != 0; bool has_fin = (frame_type & 0x01) != 0; Loading src/socket.h +1 −1 Original line number Diff line number Diff line Loading @@ -849,7 +849,7 @@ namespace netplus { // _app_ack_pending's call sites for why that distinction matters. void processFrame(const uint8_t* data, size_t len, size_t& offset, bool& ack_eliciting); void processCryptoFrame(const uint8_t* data, size_t len, size_t& offset); void processStreamFrame(const uint8_t* data, size_t len, size_t& offset); void processStreamFrame(const uint8_t* data, size_t len, size_t& offset, uint8_t frame_type); void processAckFrame(const uint8_t* data, size_t len, size_t& offset, bool is_ecn); // Sends CONNECTION_CLOSE(error_code, reason), drains the connection, // and sets offset = len so the caller's frame loop terminates — Loading Loading
src/quic.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -3882,7 +3882,7 @@ void quic::processFrame(const uint8_t* data, size_t len, size_t& offset, bool& a case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: // STREAM processStreamFrame(data, len, offset); processStreamFrame(data, len, offset, static_cast<uint8_t>(frame_type)); break; case 0x10: // MAX_DATA Loading Loading @@ -4275,11 +4275,13 @@ void quic::processCryptoFrame(const uint8_t* data, size_t len, size_t& offset) { // Frame Processing: STREAM Frame // ============================================================================ void quic::processStreamFrame(const uint8_t* data, size_t len, size_t& offset) { void quic::processStreamFrame(const uint8_t* data, size_t len, size_t& offset, uint8_t frame_type) { if (offset >= len) return; // The frame type encodes flags in bits 0-2 uint8_t frame_type = data[offset - 1]; // Already consumed type byte // The frame type encodes flags in bits 0-2 — passed in from processFrame(), // which already decoded it via decodeVarInt(), instead of re-deriving it // here from data[offset-1] (only correct because the type happens to be // single-byte-encoded; passing it down avoids relying on that). bool has_offset = (frame_type & 0x04) != 0; bool has_length = (frame_type & 0x02) != 0; bool has_fin = (frame_type & 0x01) != 0; Loading
src/socket.h +1 −1 Original line number Diff line number Diff line Loading @@ -849,7 +849,7 @@ namespace netplus { // _app_ack_pending's call sites for why that distinction matters. void processFrame(const uint8_t* data, size_t len, size_t& offset, bool& ack_eliciting); void processCryptoFrame(const uint8_t* data, size_t len, size_t& offset); void processStreamFrame(const uint8_t* data, size_t len, size_t& offset); void processStreamFrame(const uint8_t* data, size_t len, size_t& offset, uint8_t frame_type); void processAckFrame(const uint8_t* data, size_t len, size_t& offset, bool is_ecn); // Sends CONNECTION_CLOSE(error_code, reason), drains the connection, // and sets offset = len so the caller's frame loop terminates — Loading