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

Method _write_header_acknowledgement

src/proxy/http3/QPACK.cc:1439–1465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1437}
1438
1439int
1440QPACK::_write_header_acknowledgement(uint64_t stream_id)
1441{
1442 IOBufferBlock *instruction = new_IOBufferBlock();
1443 instruction->alloc(TS_IOBUFFER_SIZE_INDEX_128);
1444
1445 char *buf = instruction->end();
1446 char *buf_end = buf + instruction->write_avail();
1447 int written = 0;
1448
1449 // Header Acknowledgement
1450 buf[0] = 0x80;
1451
1452 // Stream ID
1453 int ret;
1454 if ((ret = xpack_encode_integer(reinterpret_cast<uint8_t *>(buf + written), reinterpret_cast<uint8_t *>(buf_end), stream_id, 7)) <
1455 0) {
1456 return ret;
1457 }
1458 written += ret;
1459
1460 // Finalize and Schedule to send
1461 instruction->fill(written);
1462 this->_encoder_stream_sending_instructions->append_block(instruction);
1463
1464 return 0;
1465}
1466
1467int
1468QPACK::_write_stream_cancellation(uint64_t stream_id)

Callers 1

_decodeMethod · 0.95

Calls 6

xpack_encode_integerFunction · 0.85
allocMethod · 0.45
endMethod · 0.45
write_availMethod · 0.45
fillMethod · 0.45
append_blockMethod · 0.45

Tested by

no test coverage detected