33 std::unique_ptr<HTTPCodec>
codec) :
34 infoCallback_(infoCallback),
35 transportInfo_(tinfo),
37 localAddr_(localAddr),
39 prioritySample_(false),
40 h2PrioritiesEnabled_(true),
41 exHeadersEnabled_(false) {
88 VLOG(4) << *
this <<
" Enqueued ingress. Ingress buffer uses " 92 oldSize <= readBufLimit_) {
106 VLOG(4) << *
this <<
" Dequeued " << bytes <<
" bytes of ingress. " 109 if (oldSize > readBufLimit_ &&
119 VLOG(4) << *
this <<
" creating direct error handler";
156 controllerPtr->attachSession(
this);
178 if (byteEventTracker && (encodedSize > 0)) {
virtual void setHandler(Handler *handler)
void onError(const HTTPException &error)
InfoCallback * infoCallback_
static uint32_t kDefaultReadBufLimit
void enableExHeadersSettings() noexcept
folly::SocketAddress localAddr_
virtual HTTPSettings * getEgressSettings()
virtual void onIngressLimitExceeded(const HTTPSessionBase &)
HTTPCodecFilterChain codec_
uint32_t pendingReadSize_
ProxygenError getProxygenError() const
void onEgressBodyFirstByte()
const SocketAddress peerAddr
static uint32_t maxReadBufferSize_
constexpr detail::Map< Move > move
virtual void onIngressError(const HTTPSessionBase &, ProxygenError)
virtual CodecProtocol getProtocol() const =0
void onIngressBody(std::unique_ptr< folly::IOBuf > chain, uint16_t padding)
static http_parser_settings settings
std::unique_ptr< Codec > codec_
virtual void addLastByteEvent(HTTPTransaction *txn, uint64_t byteNo) noexcept
requires E e noexcept(noexcept(s.error(std::move(e))))
requires And< SemiMovable< VN >... > &&SemiMovable< E > auto error(E e)
HTTPSessionBase(const folly::SocketAddress &localAddr, const folly::SocketAddress &peerAddr, HTTPSessionController *controller, const wangle::TransportInfo &tinfo, InfoCallback *infoCallback, std::unique_ptr< HTTPCodec > codec)
void handler(int, siginfo_t *, void *)
virtual void onSessionCodecChange(HTTPSessionBase *)
static void handleLastByteEvents(ByteEventTracker *byteEventTracker, HTTPTransaction *txn, size_t encodedSize, size_t byteOffset, bool piggybacked)
void runDestroyCallbacks()
void initCodecHeaderIndexingStrategy()
bool onBodyImpl(std::unique_ptr< folly::IOBuf > chain, size_t length, uint16_t padding, HTTPTransaction *txn)
void setHeaderIndexingStrategy(const HeaderIndexingStrategy *indexingStrat)
HTTPSessionController * getController()
void handleErrorDirectly(HTTPTransaction *txn, const HTTPException &error)
void onEgressBodyLastByte()
virtual HTTPTransactionHandler * getParseErrorHandler(HTTPTransaction *txn, const HTTPException &error, const folly::SocketAddress &localAddress)=0
virtual const HeaderIndexingStrategy * getHeaderIndexingStrategy() const
void attachToSessionController()
void setController(HTTPSessionController *controller)
virtual void detachSession(const HTTPSessionBase *session)=0
const SocketAddress localAddr
bool notifyBodyProcessed(uint32_t bytes)
bool isHTTP2CodecProtocol(CodecProtocol protocol)
folly::SocketAddress peerAddr_
static uint32_t kDefaultWriteBufLimit
virtual void onDestroy(const HTTPSessionBase &)
const folly::SocketAddress & getLocalAddress() const noexcept
HTTPSessionController * controller_
static uint32_t egressBodySizeLimit_
bool testAndSetFirstByteSent()
HTTPTransaction::Handler * getParseErrorHandler(HTTPTransaction *txn, const HTTPException &error)
virtual TransportDirection getTransportDirection() const =0
void setSetting(SettingsId id, SettingsValue val)