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

Method _read_stream_cancellation

src/proxy/http3/QPACK.cc:1645–1664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1643}
1644
1645int
1646QPACK::_read_stream_cancellation(IOBufferReader &reader, uint64_t &stream_id)
1647{
1648 size_t read_len = 0;
1649 int ret;
1650 uint8_t input[16];
1651 uint8_t *p = reinterpret_cast<uint8_t *>(reader.memcpy(input, sizeof(input)));
1652 int input_len = p - input;
1653
1654 // Stream ID
1655 // FIXME xpack_decode_integer does not support uint64_t
1656 if ((ret = xpack_decode_integer(stream_id, input, input + input_len, 6)) < 0) {
1657 return -1;
1658 }
1659 read_len += ret;
1660
1661 reader.consume(read_len);
1662
1663 return 0;
1664}

Callers 1

Calls 3

xpack_decode_integerFunction · 0.85
memcpyMethod · 0.80
consumeMethod · 0.45

Tested by

no test coverage detected