21 : accConfig_(accConfig) {
34 return std::make_unique<SPDYCodec>(direction,
38 return std::make_unique<HTTP2Codec>(direction);
39 }
else if (nextProtocol.empty() ||
41 auto codec = std::make_unique<HTTP1xCodec>(direction);
43 codec->setAllowedUpgradeProtocols(
48 return std::make_unique<SPDYCodec>(direction, *
version,
53 return std::make_unique<HTTP2Codec>(direction);
55 VLOG(2) <<
"Client requested unrecognized next protocol " << nextProtocol;
uint8_t getVersion() const
const std::string kProtocolCleartextString
const std::string kProtocolString
static bool supportsNextProtocol(const std::string &npn)
constexpr detail::Map< Move > move
std::list< std::string > allowedPlaintextUpgradeProtocols
const std::string kProtocolDraftString
const std::string kProtocolExperimentalString
folly::Optional< SPDYVersion > alwaysUseSPDYVersion_
const AcceptorConfiguration & accConfig_
std::unique_ptr< HTTPCodec > getCodec(const std::string &nextProtocol, TransportDirection direction, bool isTLS) override
std::string plaintextProtocol
FOLLY_CPP14_CONSTEXPR const Value & value() const &
HTTPDefaultSessionCodecFactory(const AcceptorConfiguration &accConfig)
folly::Optional< bool > alwaysUseHTTP2_