proxygen
|
#include <QPACKDecoder.h>
Classes | |
struct | Partial |
struct | PendingBlock |
Private Attributes | |
uint32_t | maxBlocking_ {HPACK::kDefaultBlocking} |
uint32_t | baseIndex_ {0} |
uint32_t | lastAcked_ {0} |
uint32_t | holBlockCount_ {0} |
uint64_t | queuedBytes_ {0} |
std::multimap< uint32_t, PendingBlock > | queue_ |
Partial | partial_ |
folly::IOBufQueue | ingress_ {folly::IOBufQueue::cacheChainLength()} |
Additional Inherited Members | |
Public Types inherited from proxygen::HPACKDecoderBase | |
using | headers_t = std::vector< HPACKHeader > |
Protected Member Functions inherited from proxygen::HPACKDecoderBase | |
uint32_t | emit (const HPACKHeader &header, HPACK::StreamingCallback *streamingCb, headers_t *emitted) |
void | completeDecode (HeaderCodec::Type type, HPACK::StreamingCallback *streamingCb, uint32_t compressedSize, uint32_t emittedSize) |
void | handleTableSizeUpdate (HPACKDecodeBuffer &dbuf, HeaderTable &table) |
Protected Member Functions inherited from proxygen::QPACKContext | |
const StaticHeaderTable & | getStaticTable () const |
Protected Attributes inherited from proxygen::HPACKDecoderBase | |
HPACK::DecodeError | err_ {HPACK::DecodeError::NONE} |
uint32_t | maxTableSize_ |
uint64_t | maxUncompressed_ |
Protected Attributes inherited from proxygen::QPACKContext | |
QPACKHeaderTable | table_ |
Definition at line 22 of file QPACKDecoder.h.
|
inlineexplicit |
Definition at line 26 of file QPACKDecoder.h.
References decodeEncoderStream(), decodeStreaming(), encodeCancelStream(), encodeHeaderAck(), encodeTableStateSync(), uint32_t, and uint64_t.
|
private |
Definition at line 359 of file QPACKDecoder.cpp.
References proxygen::QPACKDecoder::PendingBlock::baseIndex, baseIndex_, proxygen::QPACKDecoder::PendingBlock::block, proxygen::QPACKDecoder::PendingBlock::cb, proxygen::QPACKDecoder::PendingBlock::consumed, decodeStreamingImpl(), folly::DestructorCheck::Safety::destroyed(), proxygen::QPACKDecoder::PendingBlock::length, proxygen::HPACKDecoderBase::maxUncompressed_, and queuedBytes_.
Referenced by drainQueue().
HPACK::DecodeError proxygen::QPACKDecoder::decodeEncoderStream | ( | std::unique_ptr< folly::IOBuf > | buf | ) |
Definition at line 141 of file QPACKDecoder.cpp.
References folly::IOBufQueue::append(), baseIndex_, proxygen::HPACK::BUFFER_UNDERFLOW, folly::IOBufQueue::chainLength(), proxygen::QPACKDecoder::Partial::consumed, decodeEncoderStreamInstruction(), drainQueue(), proxygen::HPACKDecoderBase::err_, folly::IOBufQueue::front(), proxygen::HPACKDecoderBase::hasError(), ingress_, proxygen::HPACKDecoderBase::maxUncompressed_, folly::gen::move, proxygen::HPACK::NONE, partial_, and folly::IOBufQueue::trimStart().
Referenced by proxygen::hpack::encodeDecode(), QPACKDecoder(), and TEST().
|
private |
Definition at line 166 of file QPACKDecoder.cpp.
References proxygen::QPACKHeaderTable::add(), proxygen::HPACK::Instruction::code, proxygen::QPACKDecoder::Partial::consumed, proxygen::HPACKDecodeBuffer::consumedBytes(), decodeIndexedHeaderQ(), decodeLiteralHeaderQ(), proxygen::HPACKDecoderBase::handleTableSizeUpdate(), proxygen::HPACKDecoderBase::hasError(), folly::gen::move, partial_, proxygen::HPACKDecodeBuffer::peek(), proxygen::HPACK::Q_DUPLICATE, proxygen::HPACK::Q_INSERT_NAME_REF, proxygen::HPACK::Q_INSERT_NO_NAME_REF, proxygen::HPACK::Q_TABLE_SIZE_UPDATE, proxygen::QPACKContext::table_, uint8_t, and proxygen::QPACKDecoder::Partial::VALUE.
Referenced by decodeEncoderStream(), and setMaxBlocking().
|
private |
Definition at line 117 of file QPACKDecoder.cpp.
References decodeIndexedHeaderQ(), decodeLiteralHeaderQ(), proxygen::HPACKDecodeBuffer::peek(), proxygen::HPACK::Q_INDEXED, proxygen::HPACK::Q_INDEXED_POST, proxygen::HPACK::Q_LITERAL, proxygen::HPACK::Q_LITERAL_NAME_REF, proxygen::HPACK::Q_LITERAL_NAME_REF_POST, and uint8_t.
Referenced by decodeStreamingImpl(), and setMaxBlocking().
|
private |
Definition at line 262 of file QPACKDecoder.cpp.
References baseIndex_, proxygen::HPACKDecodeBuffer::decodeInteger(), proxygen::HPACKDecoderBase::emit(), proxygen::HPACKDecoderBase::err_, proxygen::ERROR, proxygen::QPACKContext::getHeader(), proxygen::HPACK::INVALID_INDEX, isValid(), proxygen::HPACK::NONE, proxygen::HPACKDecodeBuffer::peek(), and uint64_t.
Referenced by decodeEncoderStreamInstruction(), decodeHeaderQ(), and setMaxBlocking().
|
private |
Definition at line 193 of file QPACKDecoder.cpp.
References proxygen::QPACKHeaderTable::add(), baseIndex_, proxygen::HPACK::BUFFER_UNDERFLOW, proxygen::QPACKDecoder::Partial::consumed, proxygen::HPACKDecodeBuffer::consumedBytes(), proxygen::HPACKDecodeBuffer::decodeInteger(), proxygen::HPACKDecodeBuffer::decodeLiteral(), proxygen::HPACKDecoderBase::emit(), proxygen::HPACKDecoderBase::err_, proxygen::ERROR, proxygen::QPACKContext::getHeader(), proxygen::QPACKDecoder::Partial::header, proxygen::HPACK::INVALID_INDEX, isValid(), folly::gen::move, proxygen::HPACKHeader::name, proxygen::QPACKDecoder::Partial::NAME, proxygen::HPACK::NONE, folly::partial(), partial_, proxygen::HPACKDecodeBuffer::peek(), proxygen::QPACKContext::table_, uint32_t, uint64_t, proxygen::HPACKHeader::value, and proxygen::QPACKDecoder::Partial::VALUE.
Referenced by decodeEncoderStreamInstruction(), decodeHeaderQ(), and setMaxBlocking().
void proxygen::QPACKDecoder::decodeStreaming | ( | uint64_t | streamId, |
std::unique_ptr< folly::IOBuf > | block, | ||
uint32_t | totalBytes, | ||
HPACK::StreamingCallback * | streamingCb | ||
) |
Definition at line 25 of file QPACKDecoder.cpp.
References folly::IOBufQueue::append(), baseIndex_, proxygen::HPACKDecoderBase::completeDecode(), decodeStreamingImpl(), enqueueHeaderBlock(), proxygen::HPACKDecoderBase::err_, proxygen::QPACKHeaderTable::getBaseIndex(), handleBaseIndex(), maxBlocking_, proxygen::HPACKDecoderBase::maxUncompressed_, folly::IOBufQueue::move(), folly::gen::move, proxygen::HPACK::NONE, proxygen::HeaderCodec::QPACK, queue_, proxygen::QPACKContext::table_, proxygen::HPACK::TOO_MANY_BLOCKING, folly::IOBufQueue::trimStart(), and uint32_t.
Referenced by checkQError(), proxygen::QPACKCodec::decodeStreaming(), proxygen::hpack::encodeDecode(), QPACKDecoder(), and TEST().
|
private |
Definition at line 90 of file QPACKDecoder.cpp.
References proxygen::HPACKDecoderBase::completeDecode(), proxygen::HPACKDecodeBuffer::consumedBytes(), decodeHeaderQ(), proxygen::HPACKDecodeBuffer::empty(), proxygen::HPACKDecoderBase::err_, proxygen::ERROR, proxygen::HPACKDecoderBase::hasError(), proxygen::HPACK::HEADERS_TOO_LARGE, lastAcked_, max, proxygen::HPACKDecoderBase::maxUncompressed_, proxygen::HeaderCodec::QPACK, and uint32_t.
Referenced by decodeBlock(), decodeStreaming(), and setMaxBlocking().
|
private |
Definition at line 378 of file QPACKDecoder.cpp.
References decodeBlock(), proxygen::QPACKHeaderTable::getBaseIndex(), proxygen::HPACKDecoderBase::hasError(), queue_, and proxygen::QPACKContext::table_.
Referenced by decodeEncoderStream().
std::unique_ptr< folly::IOBuf > proxygen::QPACKDecoder::encodeCancelStream | ( | uint64_t | streamId | ) |
Definition at line 323 of file QPACKDecoder.cpp.
References proxygen::HPACKEncodeBuffer::encodeInteger(), proxygen::HPACK::Q_CANCEL_STREAM, queue_, and proxygen::HPACKEncodeBuffer::release().
Referenced by QPACKDecoder().
std::unique_ptr< folly::IOBuf > proxygen::QPACKDecoder::encodeHeaderAck | ( | uint64_t | streamId | ) | const |
Definition at line 315 of file QPACKDecoder.cpp.
References proxygen::HPACKEncodeBuffer::encodeInteger(), proxygen::HPACK::Q_HEADER_ACK, and proxygen::HPACKEncodeBuffer::release().
Referenced by proxygen::hpack::encodeDecode(), and QPACKDecoder().
std::unique_ptr< folly::IOBuf > proxygen::QPACKDecoder::encodeTableStateSync | ( | ) |
Definition at line 302 of file QPACKDecoder.cpp.
References proxygen::HPACKEncodeBuffer::encodeInteger(), proxygen::QPACKHeaderTable::getBaseIndex(), lastAcked_, proxygen::HPACK::Q_TABLE_STATE_SYNC, proxygen::HPACKEncodeBuffer::release(), proxygen::QPACKContext::table_, and uint32_t.
Referenced by proxygen::hpack::encodeDecode(), QPACKDecoder(), and TEST().
|
private |
Definition at line 339 of file QPACKDecoder.cpp.
References proxygen::QPACKHeaderTable::getBaseIndex(), holBlockCount_, folly::gen::move, queue_, queuedBytes_, and proxygen::QPACKContext::table_.
Referenced by decodeStreaming(), and setMaxBlocking().
|
inline |
|
inline |
|
private |
Definition at line 55 of file QPACKDecoder.cpp.
References baseIndex_, proxygen::HPACK::BUFFER_UNDERFLOW, proxygen::HPACKDecodeBuffer::decodeInteger(), proxygen::HPACKDecodeBuffer::empty(), proxygen::HPACKDecoderBase::err_, proxygen::ERROR, proxygen::HPACK::INVALID_INDEX, proxygen::HPACK::NONE, proxygen::HPACKDecodeBuffer::peek(), proxygen::HPACK::Q_DELTA_BASE, proxygen::HPACK::Q_DELTA_BASE_NEG, and uint64_t.
Referenced by decodeStreaming(), and setMaxBlocking().
|
private |
Definition at line 289 of file QPACKDecoder.cpp.
References baseIndex_, proxygen::QPACKContext::getStaticTable(), proxygen::HeaderTable::isValid(), proxygen::QPACKHeaderTable::isValid(), proxygen::QPACKContext::table_, and uint32_t.
Referenced by decodeIndexedHeaderQ(), decodeLiteralHeaderQ(), and setMaxBlocking().
|
inline |
Definition at line 54 of file QPACKDecoder.h.
References decodeEncoderStreamInstruction(), decodeHeaderQ(), decodeIndexedHeaderQ(), decodeLiteralHeaderQ(), decodeStreamingImpl(), enqueueHeaderBlock(), handleBaseIndex(), isValid(), maxBlocking_, uint32_t, uint64_t, and uint8_t.
Referenced by TEST().
|
private |
Definition at line 122 of file QPACKDecoder.h.
Referenced by decodeBlock(), decodeEncoderStream(), decodeIndexedHeaderQ(), decodeLiteralHeaderQ(), decodeStreaming(), handleBaseIndex(), and isValid().
|
private |
Definition at line 124 of file QPACKDecoder.h.
Referenced by enqueueHeaderBlock(), and getHolBlockCount().
|
private |
Definition at line 136 of file QPACKDecoder.h.
Referenced by decodeEncoderStream().
|
private |
Definition at line 123 of file QPACKDecoder.h.
Referenced by decodeStreamingImpl(), and encodeTableStateSync().
|
private |
Definition at line 121 of file QPACKDecoder.h.
Referenced by decodeStreaming(), and setMaxBlocking().
|
private |
Definition at line 135 of file QPACKDecoder.h.
Referenced by decodeEncoderStream(), decodeEncoderStreamInstruction(), and decodeLiteralHeaderQ().
|
private |
Definition at line 126 of file QPACKDecoder.h.
Referenced by decodeStreaming(), drainQueue(), encodeCancelStream(), and enqueueHeaderBlock().
|
private |
Definition at line 125 of file QPACKDecoder.h.
Referenced by decodeBlock(), enqueueHeaderBlock(), and getQueuedBytes().