MCPcopy Create free account
hub / github.com/apache/trafficserver / _on_decoder_stream_read_ready

Method _on_decoder_stream_read_ready

src/proxy/http3/QPACK.cc:1097–1128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1095}
1096
1097int
1098QPACK::_on_decoder_stream_read_ready(IOBufferReader &reader)
1099{
1100 if (reader.is_read_avail_more_than(0)) {
1101 uint8_t buf;
1102 reader.memcpy(&buf, 1);
1103 if (buf & 0x80) { // Header Acknowledgement
1104 uint64_t stream_id;
1105 if (this->_read_header_acknowledgement(reader, stream_id) >= 0) {
1106 QPACKDebug("Received Header Acknowledgement: stream_id=%" PRIu64, stream_id);
1107 this->_update_largest_known_received_index_by_stream_id(stream_id);
1108 this->_update_reference_counts(stream_id);
1109 this->_references.erase(stream_id);
1110 }
1111 } else if (buf & 0x40) { // Stream Cancellation
1112 uint64_t stream_id;
1113 if (this->_read_stream_cancellation(reader, stream_id) >= 0) {
1114 QPACKDebug("Received Stream Cancellation: stream_id=%" PRIu64, stream_id);
1115 this->_update_reference_counts(stream_id);
1116 this->_references.erase(stream_id);
1117 }
1118 } else { // Table State Synchronize
1119 uint16_t insert_count;
1120 if (this->_read_table_state_synchronize(reader, insert_count) >= 0) {
1121 QPACKDebug("Received Table State Synchronize: inserted_count=%d", insert_count);
1122 this->_update_largest_known_received_index_by_insert_count(insert_count);
1123 }
1124 }
1125 }
1126
1127 return EVENT_DONE;
1128}
1129
1130int
1131QPACK::_on_encoder_stream_read_ready(IOBufferReader &reader)

Callers 1

_on_read_readyMethod · 0.95

Tested by

no test coverage detected