| 1095 | } |
| 1096 | |
| 1097 | int |
| 1098 | QPACK::_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 | |
| 1130 | int |
| 1131 | QPACK::_on_encoder_stream_read_ready(IOBufferReader &reader) |
no test coverage detected