proxygen
proxygen::HeaderCodec Class Reference

#include <HeaderCodec.h>

Inheritance diagram for proxygen::HeaderCodec:
proxygen::GzipHeaderCodec proxygen::HPACKCodec proxygen::QPACKCodec

Classes

class  Stats
 

Public Types

enum  Type : uint8_t { Type::GZIP = 0, Type::HPACK = 1, Type::QPACK = 2 }
 

Public Member Functions

 HeaderCodec ()
 
virtual ~HeaderCodec ()
 
const HTTPHeaderSizegetEncodedSize ()
 
void setEncodeHeadroom (uint32_t headroom)
 
virtual void setMaxUncompressed (uint64_t maxUncompressed)
 
uint64_t getMaxUncompressed () const
 
void setStats (Stats *stats)
 

Static Public Attributes

static const uint32_t kMaxUncompressed = 128 * 1024
 

Protected Attributes

HTTPHeaderSize encodedSize_
 
uint32_t encodeHeadroom_ {0}
 
uint64_t maxUncompressed_ {kMaxUncompressed}
 
Statsstats_ {nullptr}
 

Detailed Description

Definition at line 35 of file HeaderCodec.h.

Member Enumeration Documentation

Enumerator
GZIP 
HPACK 
QPACK 

Definition at line 39 of file HeaderCodec.h.

Constructor & Destructor Documentation

proxygen::HeaderCodec::HeaderCodec ( )
inline

Definition at line 56 of file HeaderCodec.h.

56 {}
virtual proxygen::HeaderCodec::~HeaderCodec ( )
inlinevirtual

Definition at line 57 of file HeaderCodec.h.

57 {}

Member Function Documentation

const HTTPHeaderSize& proxygen::HeaderCodec::getEncodedSize ( )
inline

compressed and uncompressed size of the last encode

Definition at line 62 of file HeaderCodec.h.

Referenced by proxygen::compress::HPACKScheme::encode(), proxygen::compress::QPACKScheme::encode(), proxygen::HTTP2Codec::encodeHeaders(), and proxygen::SPDYCodec::encodeHeaders().

62  {
63  return encodedSize_;
64  }
HTTPHeaderSize encodedSize_
Definition: HeaderCodec.h:90
uint64_t proxygen::HeaderCodec::getMaxUncompressed ( ) const
inline

Definition at line 77 of file HeaderCodec.h.

77  {
78  return maxUncompressed_;
79  }
uint64_t maxUncompressed_
Definition: HeaderCodec.h:92
void proxygen::HeaderCodec::setEncodeHeadroom ( uint32_t  headroom)
inline

amount of space to reserve as a headroom in the encode buffer

Definition at line 69 of file HeaderCodec.h.

Referenced by proxygen::HTTP2Codec::encodeHeaders(), proxygen::SPDYCodec::encodeHeaders(), and proxygen::compress::HPACKScheme::HPACKScheme().

69  {
70  encodeHeadroom_ = headroom;
71  }
uint32_t encodeHeadroom_
Definition: HeaderCodec.h:91
virtual void proxygen::HeaderCodec::setMaxUncompressed ( uint64_t  maxUncompressed)
inlinevirtual

Reimplemented in proxygen::QPACKCodec, and proxygen::HPACKCodec.

Definition at line 73 of file HeaderCodec.h.

Referenced by proxygen::SPDYCodec::setMaxUncompressedHeaders(), and proxygen::SPDYCodec::SPDYCodec().

73  {
74  maxUncompressed_ = maxUncompressed;
75  }
uint64_t maxUncompressed_
Definition: HeaderCodec.h:92
void proxygen::HeaderCodec::setStats ( Stats stats)
inline

set the stats object

Definition at line 84 of file HeaderCodec.h.

Referenced by proxygen::HTTP2Codec::setHeaderCodecStats().

84  {
85  stats_ = stats;
86  }

Member Data Documentation

uint32_t proxygen::HeaderCodec::encodeHeadroom_ {0}
protected
const uint32_t proxygen::HeaderCodec::kMaxUncompressed = 128 * 1024
static

Definition at line 37 of file HeaderCodec.h.

uint64_t proxygen::HeaderCodec::maxUncompressed_ {kMaxUncompressed}
protected

The documentation for this class was generated from the following file: