proxygen
|
#include <HPACKEncoder.h>
Private Member Functions | |
void | encodeAsIndex (uint32_t index) |
void | encodeHeader (const HPACKHeader &header) |
bool | encodeAsLiteral (const HPACKHeader &header, bool indexing) |
void | encodeLiteral (const HPACKHeader &header, uint32_t nameIndex, const HPACK::Instruction &instruction) |
Additional Inherited Members | |
Static Public Attributes inherited from proxygen::HPACKEncoderBase | |
static const uint32_t | kBufferGrowth = 4000 |
Protected Member Functions inherited from proxygen::HPACKEncoderBase | |
void | handlePendingContextUpdate (HPACKEncodeBuffer &buf, uint32_t tableCapacity) |
Protected Member Functions inherited from proxygen::HPACKContext | |
const StaticHeaderTable & | getStaticTable () const |
uint32_t | globalToDynamicIndex (uint32_t index) const |
uint32_t | globalToStaticIndex (uint32_t index) const |
uint32_t | dynamicToGlobalIndex (uint32_t index) const |
uint32_t | staticToGlobalIndex (uint32_t index) const |
Protected Attributes inherited from proxygen::HPACKEncoderBase | |
const HeaderIndexingStrategy * | indexingStrat_ |
HPACKEncodeBuffer | streamBuffer_ |
bool | pendingContextUpdate_ {false} |
Protected Attributes inherited from proxygen::HPACKContext | |
HeaderTable | table_ |
Definition at line 19 of file HPACKEncoder.h.
|
inlineexplicit |
Definition at line 22 of file HPACKEncoder.h.
References encode(), and uint32_t.
std::unique_ptr< folly::IOBuf > proxygen::HPACKEncoder::encode | ( | const std::vector< HPACKHeader > & | headers, |
uint32_t | headroom = 0 |
||
) |
Encode the given headers.
Definition at line 17 of file HPACKEncoder.cpp.
References proxygen::HPACKEncodeBuffer::addHeadroom(), proxygen::HeaderTable::capacity(), encodeHeader(), proxygen::HPACKEncoderBase::handlePendingContextUpdate(), proxygen::HPACKEncodeBuffer::release(), proxygen::HPACKEncoderBase::streamBuffer_, and proxygen::HPACKContext::table_.
Referenced by encode(), proxygen::HPACKCodec::encode(), proxygen::hpack::encodeDecode(), HPACKEncoder(), TEST_F(), and TEST_P().
|
private |
Definition at line 63 of file HPACKEncoder.cpp.
References proxygen::HPACKEncodeBuffer::encodeInteger(), proxygen::HPACK::INDEX_REF, and proxygen::HPACKEncoderBase::streamBuffer_.
Referenced by encodeHeader(), and setHeaderTableSize().
|
private |
Definition at line 28 of file HPACKEncoder.cpp.
References proxygen::HeaderTable::add(), proxygen::HPACKHeader::bytes(), proxygen::HeaderTable::capacity(), proxygen::HPACKHeader::copy(), encodeLiteral(), proxygen::HPACK::LITERAL, proxygen::HPACK::LITERAL_INC_INDEX, proxygen::HPACKHeader::name, proxygen::HPACKContext::nameIndex(), and proxygen::HPACKContext::table_.
Referenced by encodeHeader(), and setHeaderTableSize().
|
private |
Definition at line 68 of file HPACKEncoder.cpp.
References encodeAsIndex(), encodeAsLiteral(), proxygen::HPACKContext::getIndex(), proxygen::HeaderIndexingStrategy::indexHeader(), proxygen::HPACKEncoderBase::indexingStrat_, and uint32_t.
Referenced by encode(), and setHeaderTableSize().
|
private |
Definition at line 48 of file HPACKEncoder.cpp.
References proxygen::HPACKEncodeBuffer::encodeInteger(), proxygen::HPACKEncodeBuffer::encodeLiteral(), proxygen::HPACKHeaderName::get(), proxygen::HPACKHeader::name, proxygen::HPACKContext::nameIndex(), proxygen::HPACKEncoderBase::streamBuffer_, and proxygen::HPACKHeader::value.
Referenced by encodeAsLiteral(), and setHeaderTableSize().
|
inline |
Definition at line 35 of file HPACKEncoder.h.
References encodeAsIndex(), encodeAsLiteral(), encodeHeader(), encodeLiteral(), proxygen::HPACKContext::nameIndex(), proxygen::HPACKEncoderBase::setHeaderTableSize(), proxygen::HPACKContext::table_, and uint32_t.
Referenced by TEST_P().