27 VLOG(4) <<
"isReusable: " << *
this 30 <<
", sock_->connecting()=" <<
sock_->connecting()
37 <<
", codec_->supportsParallelRequests()=" 41 !
sock_->connecting() &&
53 VLOG(5) <<
"isClosing: " << *
this 54 <<
", sock_->good()=" <<
sock_->good()
106 auto txnID = txn->getID();
107 txn->setHandler(CHECK_NOTNULL(handler));
121 if (!txn.second.isPushed() && !txn.second.isEgressStarted()) {
133 VLOG(4) << *
this <<
" onNativeProtocolUpgrade streamID=" << streamID <<
134 " protocol=" << protocolString;
141 std::unique_ptr<HTTPCodec>
codec =
166 if (checkSocket &&
sock_ && !
sock_->isDetachable()) {
186 sock_->attachEventBase(eventBase);
197 #ifndef NO_ASYNCSSLSOCKET 199 if (sslSocket && sslContext) {
200 sslSocket->attachSSLContext(sslContext);
211 if (detachSSLContext) {
214 sock_->detachEventBase();
224 cm->removeConnection(
this);
229 #ifndef NO_ASYNCSSLSOCKET 232 sslSocket->detachSSLContext();
void detachThreadLocals(bool detachSSLContext=false) override
HTTPTransaction * createTransaction(HTTPCodec::StreamID streamID, const folly::Optional< HTTPCodec::StreamID > &assocStreamID, const folly::Optional< HTTPCodec::ExAttributes > &exAttributes, const http2::PriorityUpdate &priority=http2::DefaultPriority)
bool onNativeProtocolUpgradeImpl(HTTPCodec::StreamID txn, std::unique_ptr< HTTPCodec > codec, const std::string &protocolString)
virtual StreamID createStream()=0
void setSessionStats(HTTPSessionStats *stats) override
void foreach(folly::FunctionRef< void(FilterChainType *)> fn)
HTTPTransaction * newTransaction(HTTPTransaction::Handler *handler) override
uint8_t maxVirtualPriorityLevel_
HTTPCodecFilterChain codec_
void detachTransactions()
std::unique_ptr< PriorityAdapter > priorityAdapter_
void rescheduleLoopCallbacks()
~HTTPUpstreamSession() override
WriteTimeout writeTimeout_
constexpr detail::Map< Move > move
void setNewTransactionPauseState(HTTPCodec::StreamID streamID)
bool writesPaused() const
folly::AsyncTransportWrapper::UniquePtr sock_
bool isReusable() const override
HTTP2PriorityQueue txnEgressQueue_
bool resetAfterDrainingWrites_
unsigned numActiveWrites_
bool isReplaySafe() const override
WheelTimerInstance timeout_
void handler(int, siginfo_t *, void *)
void attachThreadLocals(const WheelTimerInstance &timeout)
class HTTP2PriorityQueue
std::function< void(HTTPCodecFilter *)> FilterIteratorFn
HTTPTransaction::Handler * getTransactionTimeoutHandler(HTTPTransaction *txn) override
std::shared_ptr< SSLContext > SSLContextPtr
void maybeAttachSSLContext(folly::SSLContextPtr sslContext) const
void maybeDetachSSLContext() const
virtual size_t addPriorityNodes(PriorityQueue &, folly::IOBufQueue &, uint8_t)
bool readsShutdown() const
ConnectionManager * getConnectionManager()
bool writesShutdown() const
uint32_t liveTransactions_
std::shared_ptr< const PriorityMapFactory > priorityMapFactory_
void attachThreadLocals(folly::EventBase *eventBase, folly::SSLContextPtr sslContext, const WheelTimerInstance &timeout, HTTPSessionStats *stats, FilterIteratorFn fn, HeaderCodec::Stats *headerCodecStats, HTTPSessionController *controller) override
std::map< HTTPCodec::StreamID, HTTPTransaction > transactions_
void detachThreadLocals()
folly::IOBufQueue writeBuf_
void setController(HTTPSessionController *controller)
bool isClosing() const override
bool onNativeProtocolUpgrade(HTTPCodec::StreamID streamID, CodecProtocol protocol, const std::string &protocolString, HTTPMessage &msg) override
virtual bool isReusable() const =0
static const folly::Optional< StreamID > NoStream
uint32_t getNumIncomingStreams() const override
virtual void setHeaderCodecStats(HeaderCodec::Stats *)
bool allTransactionsStarted() const override
void detach(HTTPTransaction *txn) noexceptoverride
void cancelLoopCallbacks()
bool isDetachable(bool checkSocket=true) const override
virtual bool isBusy() const =0
virtual bool supportsParallelRequests() const =0
bool supportsMoreTransactions() const
bool hasMoreWrites() const
static const folly::Optional< ExAttributes > NoExAttributes