74 std::unique_ptr<folly::IOBuf> chain,
79 size_t length)
override;
94 std::unique_ptr<folly::IOBuf> debugData =
nullptr)
override;
109 std::unique_ptr<folly::IOBuf> certificateRequestData)
override;
112 std::unique_ptr<folly::IOBuf> certData)
override;
188 std::vector<compress::Header>& allHeaders,
213 std::unique_ptr<folly::IOBuf> headerBuf,
221 std::unique_ptr<HTTPMessage>& msg);
size_t addPriorityNodes(PriorityQueue &queue, folly::IOBufQueue &writeBuf, uint8_t maxLevel) override
void generateContinuation(folly::IOBufQueue &writeBuf, folly::IOBufQueue &queue, StreamID stream, size_t maxFrameSize)
ErrorCode parseFrame(folly::io::Cursor &cursor)
ErrorCode parseDataFrameData(folly::io::Cursor &cursor, size_t bufLen, size_t &parsed)
ErrorCode parsePushPromise(folly::io::Cursor &cursor)
const uint32_t kInitialWindow
spdy::GoawayStatusCode statusCode
folly::IOBufQueue curHeaderBlock_
http2::FrameType headerBlockFrameType_
ErrorCode parseWindowUpdate(folly::io::Cursor &cursor)
HTTP2Codec(TransportDirection direction)
HTTPSettings ingressSettings_
ErrorCode parseContinuation(folly::io::Cursor &cursor)
ErrorCode parseCertificateRequest(folly::io::Cursor &cursor)
ErrorCode parseCertificate(folly::io::Cursor &cursor)
void setHeaderCodecStats(HeaderCodec::Stats *hcStats) override
ErrorCode parseHeadersImpl(folly::io::Cursor &cursor, std::unique_ptr< folly::IOBuf > headerBuf, const folly::Optional< http2::PriorityUpdate > &priority, const folly::Optional< uint32_t > &promisedStream, const folly::Optional< ExAttributes > &exAttributes)
HTTPSettings egressSettings_
size_t generatePingReply(folly::IOBufQueue &writeBuf, uint64_t uniqueID) override
void generatePushPromise(folly::IOBufQueue &writeBuf, StreamID stream, const HTTPMessage &msg, StreamID assocStream, bool eom=false, HTTPHeaderSize *size=nullptr) override
size_t generatePingRequest(folly::IOBufQueue &writeBuf) override
void onHeader(const folly::fbstring &name, const folly::fbstring &value) override
ErrorCode parseGoaway(folly::io::Cursor &cursor)
void generateExHeader(folly::IOBufQueue &writeBuf, StreamID stream, const HTTPMessage &msg, const HTTPCodec::ExAttributes &exAttributes, bool eom=false, HTTPHeaderSize *size=nullptr) override
size_t onIngress(const folly::IOBuf &buf) override
void generateHeaderImpl(folly::IOBufQueue &writeBuf, StreamID stream, const HTTPMessage &msg, const folly::Optional< StreamID > &assocStream, const folly::Optional< ExAttributes > &exAttributes, bool eom, HTTPHeaderSize *size)
folly::Optional< ErrorCode > parseHeadersDecodeFrames(const folly::Optional< http2::PriorityUpdate > &priority, const folly::Optional< uint32_t > &promisedStream, const folly::Optional< ExAttributes > &exAttributes, std::unique_ptr< HTTPMessage > &msg)
std::unordered_set< StreamID > upgradedStreams_
bool supportsExTransactions() const override
void generateHeader(folly::IOBufQueue &writeBuf, StreamID stream, const HTTPMessage &msg, bool eom=false, HTTPHeaderSize *size=nullptr) override
size_t generateRstStream(folly::IOBufQueue &writeBuf, StreamID stream, ErrorCode statusCode) override
static http_parser_settings settings
ErrorCode checkNewStream(uint32_t stream, bool trailersAllowed)
ErrorCode parseAllData(folly::io::Cursor &cursor)
const HeaderIndexingStrategy * getHeaderIndexingStrategy() const
size_t generateCertificate(folly::IOBufQueue &writeBuf, uint16_t certId, std::unique_ptr< folly::IOBuf > certData) override
HPACKTableInfo getHPACKTableInfo() const override
requires And< SemiMovable< VN >... > &&SemiMovable< E > auto error(E e)
size_t generateEOM(folly::IOBufQueue &writeBuf, StreamID stream) override
const HeaderIndexingStrategy * getHeaderIndexingStrategy() const
const HTTPSettings * getIngressSettings() const override
bool peerHasWebsockets() const
size_t generateBody(folly::IOBufQueue &writeBuf, StreamID stream, std::unique_ptr< folly::IOBuf > chain, folly::Optional< uint8_t > padding, bool eom) override
size_t generatePriority(folly::IOBufQueue &writeBuf, StreamID stream, const HTTPMessage::HTTPPriority &pri) override
size_t pendingDataFrameBytes_
size_t maxSendFrameSize() const
static void requestUpgrade(HTTPMessage &request)
HTTPCodec::StreamID mapPriorityToDependency(uint8_t priority) const override
bool pendingEndStreamHandling_
bool onIngressUpgradeMessage(const HTTPMessage &msg) override
const uint32_t kMaxFramePayloadLengthMin
size_t generateSettingsAck(folly::IOBufQueue &writeBuf) override
uint32_t maxRecvFrameSize() const
folly::Optional< ErrorCode > parseHeadersCheckConcurrentStreams(const folly::Optional< http2::PriorityUpdate > &priority)
ErrorCode handleSettings(const std::deque< SettingPair > &settings)
constexpr auto size(C const &c) -> decltype(c.size())
void setHeaderIndexingStrategy(const HeaderIndexingStrategy *indexingStrat)
void writeBuf(const Buf &buf, folly::io::Appender &out)
static Options cacheChainLength()
size_t generateConnectionPreface(folly::IOBufQueue &writeBuf) override
void onDecodeError(HPACK::DecodeError decodeError) override
size_t generateGoaway(folly::IOBufQueue &writeBuf, StreamID lastStream, ErrorCode statusCode, std::unique_ptr< folly::IOBuf > debugData=nullptr) override
HeaderDecodeInfo decodeInfo_
std::vector< StreamID > virtualPriorityNodes_
static const char *const value
StreamID expectedContinuationStream_
folly::IOBufQueue curAuthenticatorBlock_
http2::FrameHeader curHeader_
ErrorCode parseExHeaders(folly::io::Cursor &cursor)
size_t generateHeaderCallbackWrapper(StreamID stream, http2::FrameType type, size_t length)
bool ingressWebsocketUpgrade_
std::tuple< uint32_t, bool, uint8_t > HTTPPriority
size_t generateTrailers(folly::IOBufQueue &writeBuf, StreamID stream, const HTTPHeaders &trailers) override
uint64_t receivedFrameCount_
bool reuseIOBufHeadroomForData_
void streamError(const std::string &msg, ErrorCode error, bool newTxn=false)
bool parsingDownstreamTrailers_
std::unique_ptr< folly::IOBuf > encodeHeaders(const HTTPHeaders &headers, std::vector< compress::Header > &allHeaders, HTTPHeaderSize *size)
HTTPSettings * getEgressSettings() override
size_t pendingDataFramePaddingBytes_
bool checkConnectionError(ErrorCode, const folly::IOBuf *buf)
ErrorCode parseSettings(folly::io::Cursor &cursor)
size_t generateChunkHeader(folly::IOBufQueue &writeBuf, StreamID stream, size_t length) override
const std::string & getUserAgent() const override
ErrorCode parseRstStream(folly::io::Cursor &cursor)
size_t generateWindowUpdate(folly::IOBufQueue &writeBuf, StreamID stream, uint32_t delta) override
CodecProtocol getProtocol() const override
ErrorCode parsePriority(folly::io::Cursor &cursor)
void onHeadersComplete(HTTPHeaderSize decodedSize) override
uint64_t getReceivedFrameCount() const
TransportDirection transportDirection_
ErrorCode handleEndStream()
ErrorCode parsePing(folly::io::Cursor &cursor)
void setHeaderIndexingStrategy(const HeaderIndexingStrategy *indexingStrat)
HPACKTableInfo getHPACKTableInfo() const
void setReuseIOBufHeadroomForData(bool enabled)
bool supportsPushTransactions() const override
bool parsingTrailers() const
size_t generateChunkTerminator(folly::IOBufQueue &writeBuf, StreamID stream) override
size_t generateSettings(folly::IOBufQueue &writeBuf) override
const HTTPSetting * getSetting(SettingsId id) const
size_t generateCertificateRequest(folly::IOBufQueue &writeBuf, uint16_t requestId, std::unique_ptr< folly::IOBuf > certificateRequestData) override
ErrorCode parseHeaders(folly::io::Cursor &cursor)
bool isRequest(StreamID id) const
uint32_t getDefaultWindowSize() const override