proxygen
|
#include <HPACKContext.h>
Public Member Functions | |
HPACKContext (uint32_t tableSize) | |
~HPACKContext () | |
uint32_t | getIndex (const HPACKHeader &header) const |
uint32_t | nameIndex (const HPACKHeaderName &headerName) const |
bool | isStatic (uint32_t index) const |
const HPACKHeader & | getHeader (uint32_t index) |
const HeaderTable & | getTable () const |
uint32_t | getTableSize () const |
uint32_t | getBytesStored () const |
uint32_t | getHeadersStored () const |
void | seedHeaderTable (std::vector< HPACKHeader > &headers) |
void | describe (std::ostream &os) const |
Protected Member Functions | |
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 | |
HeaderTable | table_ |
Definition at line 18 of file HPACKContext.h.
|
explicit |
Definition at line 14 of file HPACKContext.cpp.
|
inline |
Definition at line 21 of file HPACKContext.h.
References getHeader(), getIndex(), isStatic(), nameIndex(), and uint32_t.
void proxygen::HPACKContext::describe | ( | std::ostream & | os | ) | const |
Definition at line 82 of file HPACKContext.cpp.
References table_.
Referenced by getHeadersStored(), and proxygen::operator<<().
Definition at line 79 of file HPACKContext.h.
References getStaticTable(), and proxygen::HeaderTable::size().
Referenced by getIndex(), and nameIndex().
|
inline |
Definition at line 56 of file HPACKContext.h.
References proxygen::HeaderTable::bytes(), and table_.
const HPACKHeader & proxygen::HPACKContext::getHeader | ( | uint32_t | index | ) |
Definition at line 68 of file HPACKContext.cpp.
References proxygen::HeaderTable::getHeader(), getStaticTable(), globalToDynamicIndex(), globalToStaticIndex(), isStatic(), and table_.
Referenced by proxygen::HPACKDecoder::decodeIndexedHeader(), proxygen::HPACKDecoder::decodeLiteralHeader(), TEST_F(), TEST_P(), and ~HPACKContext().
|
inline |
Definition at line 60 of file HPACKContext.h.
References describe(), seedHeaderTable(), proxygen::HeaderTable::size(), and table_.
uint32_t proxygen::HPACKContext::getIndex | ( | const HPACKHeader & | header | ) | const |
get the index of the given header by looking into both dynamic and static header table
Definition at line 18 of file HPACKContext.cpp.
References dynamicToGlobalIndex(), folly::basic_fbstring< E, T, A, Storage >::empty(), proxygen::HPACKHeaderName::getHeaderCode(), proxygen::HeaderTable::getIndex(), getStaticTable(), proxygen::HPACKHeaderName::isCommonHeader(), proxygen::StaticHeaderTable::isHeaderCodeInTableWithNonEmptyValue(), proxygen::HPACKHeader::name, staticToGlobalIndex(), table_, uint32_t, and proxygen::HPACKHeader::value.
Referenced by proxygen::HPACKEncoder::encodeHeader(), TEST_F(), and ~HPACKContext().
|
inlineprotected |
Definition at line 69 of file HPACKContext.h.
References proxygen::StaticHeaderTable::get().
Referenced by dynamicToGlobalIndex(), getHeader(), getIndex(), globalToDynamicIndex(), isStatic(), proxygen::HPACKDecoder::isValid(), and nameIndex().
|
inline |
Definition at line 48 of file HPACKContext.h.
References table_.
Referenced by proxygen::hpack::encodeDecode(), TEST_F(), and TEST_P().
|
inline |
Definition at line 52 of file HPACKContext.h.
References proxygen::HeaderTable::capacity(), and table_.
Definition at line 73 of file HPACKContext.h.
References getStaticTable(), and proxygen::HeaderTable::size().
Referenced by getHeader(), and proxygen::HPACKDecoder::isValid().
Definition at line 76 of file HPACKContext.h.
Referenced by getHeader(), and proxygen::HPACKDecoder::isValid().
bool proxygen::HPACKContext::isStatic | ( | uint32_t | index | ) | const |
Definition at line 64 of file HPACKContext.cpp.
References getStaticTable(), and proxygen::HeaderTable::size().
Referenced by getHeader(), proxygen::HPACKDecoder::isValid(), TEST_F(), and ~HPACKContext().
uint32_t proxygen::HPACKContext::nameIndex | ( | const HPACKHeaderName & | headerName | ) | const |
index of a header entry with the given name from dynamic or static table
Definition at line 52 of file HPACKContext.cpp.
References dynamicToGlobalIndex(), getStaticTable(), proxygen::HeaderTable::nameIndex(), staticToGlobalIndex(), table_, and uint32_t.
Referenced by proxygen::HPACKEncoder::encodeAsLiteral(), proxygen::HPACKEncoder::encodeLiteral(), proxygen::HPACKEncoder::setHeaderTableSize(), and ~HPACKContext().
void proxygen::HPACKContext::seedHeaderTable | ( | std::vector< HPACKHeader > & | headers | ) |
Definition at line 75 of file HPACKContext.cpp.
References proxygen::HeaderTable::add(), folly::gen::move, and table_.
Referenced by getHeadersStored().
Definition at line 82 of file HPACKContext.h.
Referenced by getIndex(), and nameIndex().
|
protected |
Definition at line 86 of file HPACKContext.h.
Referenced by proxygen::HPACKDecoder::decodeHeader(), proxygen::HPACKDecoder::decodeLiteralHeader(), describe(), proxygen::HPACKEncoder::encode(), proxygen::HPACKEncoder::encodeAsLiteral(), getBytesStored(), getHeader(), getHeadersStored(), getIndex(), getTable(), getTableSize(), proxygen::HPACKDecoder::isValid(), nameIndex(), seedHeaderTable(), and proxygen::HPACKEncoder::setHeaderTableSize().