proxygen
|
#include <HTTPSession.h>
Classes | |
class | DrainTimeout |
class | FlowControlTimeout |
class | ShutdownTransportCallback |
class | WriteSegment |
class | WriteTimeout |
Public Types | |
using | UniquePtr = std::unique_ptr< HTTPSession, Destructor > |
Public Types inherited from proxygen::HTTPSessionBase | |
enum | SessionType { SessionType::HTTP, SessionType::HQ } |
using | FilterIteratorFn = std::function< void(HTTPCodecFilter *)> |
Protected Attributes | |
WriteTimeout | writeTimeout_ |
folly::IOBufQueue | writeBuf_ {folly::IOBufQueue::cacheChainLength()} |
folly::IOBufQueue | readBuf_ {folly::IOBufQueue::cacheChainLength()} |
HTTP2PriorityQueue | txnEgressQueue_ |
std::map< HTTPCodec::StreamID, HTTPTransaction > | transactions_ |
uint32_t | liveTransactions_ {0} |
folly::AsyncTransportWrapper::UniquePtr | sock_ |
WheelTimerInstance | timeout_ |
unsigned | numActiveWrites_ {0} |
bool | draining_:1 |
bool | started_:1 |
bool | writesDraining_:1 |
bool | resetAfterDrainingWrites_:1 |
bool | ingressError_:1 |
Protected Attributes inherited from proxygen::HTTPSessionBase | |
HTTPSessionStats * | sessionStats_ {nullptr} |
InfoCallback * | infoCallback_ {nullptr} |
wangle::TransportInfo | transportInfo_ |
HTTPCodecFilterChain | codec_ |
folly::SocketAddress | localAddr_ |
folly::SocketAddress | peerAddr_ |
Private Types | |
enum | SocketState { UNPAUSED = 0, PAUSED = 1, SHUTDOWN = 2 } |
using | WriteSegmentList = folly::IntrusiveList< WriteSegment,&WriteSegment::listHook > |
Additional Inherited Members | |
Static Public Member Functions inherited from proxygen::HTTPSessionBase | |
static void | setDefaultReadBufferLimit (uint32_t limit) |
static void | setMaxReadBufferSize (uint32_t bytes) |
static void | setFlowControlledBodySizeLimit (uint32_t limit) |
static void | setDefaultWriteBufferLimit (uint32_t max) |
Static Protected Member Functions inherited from proxygen::HTTPSessionBase | |
static void | handleLastByteEvents (ByteEventTracker *byteEventTracker, HTTPTransaction *txn, size_t encodedSize, size_t byteOffset, bool piggybacked) |
Static Protected Attributes inherited from proxygen::HTTPSessionBase | |
static uint32_t | kDefaultReadBufLimit = 65536 |
static uint32_t | maxReadBufferSize_ = 4000 |
static uint32_t | kDefaultWriteBufLimit = 65536 |
static uint32_t | egressBodySizeLimit_ = 4096 |
Definition at line 43 of file HTTPSession.h.
using proxygen::HTTPSession::UniquePtr = std::unique_ptr<HTTPSession, Destructor> |
Definition at line 55 of file HTTPSession.h.
|
private |
Definition at line 907 of file HTTPSession.h.
|
private |
Enumerator | |
---|---|
UNPAUSED | |
PAUSED | |
SHUTDOWN |
Definition at line 1035 of file HTTPSession.h.
|
protected |
HTTPSession is an abstract base class and cannot be instantiated directly. If you want to handle requests and send responses (act as a server), construct a HTTPDownstreamSession. If you want to make requests and handle responses (act as a client), construct a HTTPUpstreamSession.
transactionTimeouts | Timeout for each transaction in the session. |
sock | An open socket on which any applicable TLS handshaking has been completed already. |
localAddr | Address and port of the local end of the socket. |
peerAddr | Address and port of the remote end of the socket. |
controller | Controller which can create the handler for a new transaction. |
codec | A codec with which to parse/generate messages in whatever HTTP-like wire format this session needs. |
tinfo | Struct containing the transport's TCP/SSL level info. |
InfoCallback | Optional callback to be informed of session lifecycle events. |
Referenced by connCloseByRemote(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
|
overrideprotected |
Definition at line 278 of file HTTPSession.cpp.
References folly::HHWheelTimer::Callback::cancelTimeout(), proxygen::HTTP2PriorityQueue::dropPriorityNodes(), proxygen::HTTP2PriorityQueue::empty(), flowControlTimeout_, folly::HHWheelTimer::Callback::isScheduled(), proxygen::HTTPSessionBase::runDestroyCallbacks(), sock_, transactions_, txnEgressQueue_, and writeTimeout_.
Referenced by connCloseByRemote().
|
private |
Referenced by getMaxConcurrentOutgoingStreamsRemote().
|
privatenoexcept |
Referenced by getMaxConcurrentOutgoingStreamsRemote().
|
inlineoverrideprivatenoexcept |
Add a ReplaySafetyCallback requesting notification when the transport has replay protection.
Most transport-layer security protocols (like TLS) provide protection against an eavesdropper capturing data, and later replaying it to the server. However, 0-RTT security protocols allow initial data to be sent without replay protection before the security handshake completes. This function can be used when a HTTP session is in that initial non-replay safe stage, but a request requires a replay safe transport. Will trigger callback synchronously if the transport is already replay safe.
Definition at line 800 of file HTTPSession.h.
References waitingForReplaySafety_.
|
protectedpure virtual |
Implemented in proxygen::HTTPUpstreamSession, and proxygen::HTTPDownstreamSession.
Referenced by drain(), onHeadersSent(), and shouldShutdown().
|
inlineprotected |
Definition at line 661 of file HTTPSession.h.
References folly::EventBase::LoopCallback::cancelLoopCallback(), folly::EventBase::LoopCallback::isLoopCallbackScheduled(), and shutdownTransportCb_.
Referenced by proxygen::HTTPUpstreamSession::detachThreadLocals().
|
protected |
Check whether the socket is shut down in both directions; if it is, initiate the destruction of this HTTPSession.
Definition at line 2435 of file HTTPSession.cpp.
References folly::DelayedDestruction::destroy(), folly::EventBase::LoopCallback::isLoopCallbackScheduled(), reads_, readsShutdown(), resetSocketOnShutdown_, folly::AsyncSocket::setBufferCallback(), proxygen::SHUTDOWN, sock_, transactions_, and writesShutdown().
Referenced by detach(), immediateShutdown(), runLoopCallback(), sessionByteOffset(), shutdownTransport(), and shutdownTransportWithReset().
|
overridevirtual |
Instruct the connection that it should shutdown as soon as it is safe. This is called after notifyPendingShutdown().
Implements wangle::ManagedConnection.
Definition at line 464 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, drain(), dropConnection(), proxygen::HTTPCodec::generateGoaway(), proxygen::HTTPCodec::getLastIncomingStreamID(), hasMoreWrites(), isBusy(), proxygen::NO_ERROR, scheduleWrite(), and writeBuf_.
Referenced by CurlService::CurlClient::connectSuccess(), timeoutExpired(), and proxygen::HTTPSession::DrainTimeout::timeoutExpired().
|
privatenoexcept |
Common EOM process shared by sendHeaders, sendBody and sendEOM
txn | the transaction that's sending request |
encodedSize | size of data frame generated by codec |
piggybacked | whether this eom is a separate sendEOM or piggybacked in sendHeaders and sendBody |
Definition at line 1656 of file HTTPSession.cpp.
References byteEventTracker_, proxygen::HTTPSessionBase::handleLastByteEvents(), onEgressMessageFinished(), and sessionByteOffset().
Referenced by isConnWindowFull(), sendBody(), sendEOM(), and sendHeaders().
|
inlineoverridevirtual |
If the connection is closed by remote end
Implements proxygen::HTTPSessionBase.
Definition at line 215 of file HTTPSession.h.
References codec, getSecondAuthManager(), getTransactionTimeoutHandler(), getTransport(), folly::AsyncTransportWrapper::getUnderlyingTransport(), HTTPSession(), folly::AsyncSocket::isClosedByPeer(), proxygen::localAddr, proxygen::peerAddr, setSecondAuthManager(), setupOnHeadersComplete(), and ~HTTPSession().
|
protected |
Create a new transaction.
Definition at line 2555 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, getCodecSendWindowSize(), wangle::ManagedConnection::getConnectionManager(), proxygen::WheelTimerInstance::getDefaultTimeout(), proxygen::HTTPTransaction::getID(), proxygen::HTTPSessionBase::getNumTxnServed(), proxygen::HTTPTransaction::getSessionStats(), proxygen::HTTPCodec::getTransportDirection(), proxygen::WheelTimerInstance::getWheelTimer(), incomingStreams_, incrementOutgoingStreams(), proxygen::HTTPSessionBase::incrementSeqNo(), proxygen::HTTPSessionBase::infoCallback_, initialReceiveWindow_, isDownstream(), proxygen::HTTPSessionBase::isPrioritySampled(), proxygen::HTTPTransaction::isPushed(), isUpstream(), liveTransactions_, proxygen::HTTPSessionBase::InfoCallback::onActivateConnection(), wangle::ConnectionManager::onActivated(), proxygen::HTTPSessionBase::onCreateTransaction(), receiveStreamWindowSize_, proxygen::HTTPSessionStats::recordSessionReused(), proxygen::HTTPSessionBase::sessionStats_, proxygen::HTTPTransaction::setPrioritySampled(), proxygen::HTTPTransaction::setReceiveWindow(), sock_, streamID, proxygen::HTTPCodec::supportsStreamFlowControl(), timeout_, transactions_, and txnEgressQueue_.
Referenced by newExTransaction(), newPushedTransaction(), proxygen::HTTPUpstreamSession::newTransaction(), onError(), onExMessageBegin(), onMessageBegin(), onPushMessageBegin(), and sessionByteOffset().
|
protected |
Definition at line 1858 of file HTTPSession.cpp.
References incomingStreams_, isDownstream(), proxygen::HTTPTransaction::isPushed(), isUpstream(), outgoingStreams_, and proxygen::HTTPTransaction::testAndClearActive().
Referenced by detach(), onEgressMessageFinished(), onHeadersSent(), and onMessageComplete().
|
overridevirtual |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 435 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::getCodecProtocolString(), getLocalAddress(), getPeerAddress(), proxygen::HTTPCodec::getProtocol(), proxygen::HTTPCodec::getUserAgent(), and isDownstream().
Referenced by timeoutExpired().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1896 of file HTTPSession.cpp.
References checkForShutdown(), decrementTransactionCount(), findTransaction(), wangle::ManagedConnection::getConnectionManager(), getPipelineStreamCount(), folly::gen::guard(), hasMoreWrites(), proxygen::HTTPSessionBase::infoCallback_, folly::HHWheelTimer::Callback::isScheduled(), liveTransactions_, maybeResumePausedPipelinedTransaction(), proxygen::HTTPSessionBase::InfoCallback::onDeactivateConnection(), wangle::ConnectionManager::onDeactivated(), proxygen::HTTPSessionBase::InfoCallback::onTransactionDetached(), readsShutdown(), proxygen::HTTPTransaction::removeExTransaction(), proxygen::HTTPTransaction::removePushedTransaction(), wangle::ManagedConnection::resetTimeout(), resumeIngress(), resumeReads(), proxygen::HTTPSessionBase::setLatestActive(), shouldShutdown(), shutdownTransport(), streamID, transactions_, writesDraining_, and writesShutdown().
Referenced by proxygen::HTTPUpstreamSession::detachTransactions(), numIncomingStreams(), and proxygen::HTTPSession::WriteSegment::setEOR().
|
overrideprotectedvirtual |
Drains the current transactions and prevents new transactions from being created on this session. If this is an upstream session and the number of transactions reaches zero, this session will shutdown the transport and delete itself. For downstream sessions, an explicit call to dropConnection() or shutdownTransport() is required.
Implements proxygen::HTTPSessionBase.
Reimplemented in proxygen::HTTPUpstreamSession.
Definition at line 2462 of file HTTPSession.cpp.
References allTransactionsStarted(), drainImpl(), draining_, isUpstream(), proxygen::HTTPSessionBase::setCloseReason(), proxygen::SHUTDOWN, shutdownTransport(), and transactions_.
Referenced by closeWhenIdle(), proxygen::HTTPUpstreamSession::drain(), isDraining(), notifyPendingShutdown(), and onGoaway().
|
protected |
Definition at line 2482 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateGoaway(), getGracefulGoawayAck(), proxygen::HTTPCodec::isReusable(), proxygen::HTTPCodec::isWaitingToDrain(), proxygen::NO_ERROR, scheduleWrite(), proxygen::HTTPSessionBase::setCloseReason(), proxygen::SHUTDOWN, started_, and writeBuf_.
Referenced by drain(), invokeOnAllTransactions(), and sendHeaders().
|
overridevirtual |
Forcibly drop a connection.
If a request is in progress, this should cause the connection to be closed with a reset.
Implements wangle::ManagedConnection.
Definition at line 493 of file HTTPSession.cpp.
References hasMoreWrites(), immediateShutdown(), proxygen::kErrorDropped, readsShutdown(), proxygen::HTTPSessionBase::setCloseReason(), proxygen::SHUTDOWN, shutdownTransport(), shutdownTransportWithReset(), sock_, transactions_, and writesShutdown().
Referenced by closeWhenIdle(), and timeoutExpired().
|
overridevirtual |
Dump the state of the connection to the log
Implements wangle::ManagedConnection.
Definition at line 515 of file HTTPSession.cpp.
Referenced by timeoutExpired().
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 208 of file HTTPSession.h.
References proxygen::HTTPSessionBase::codec_, and proxygen::HTTPCodec::enableDoubleGoawayDrain().
|
protected |
This function invokes a callback on all transactions. It is safe, but runs in O(n*log n) and if the callback adds transactions, they will not get the callback.
Definition at line 2812 of file HTTPSession.cpp.
References errorOnTransactionIds(), and transactions_.
Referenced by invokeOnAllTransactions(), and shutdownTransportWithReset().
|
protected |
Definition at line 2841 of file HTTPSession.cpp.
References findTransaction(), and folly::gen::move.
Referenced by errorOnTransactionIds(), invokeOnAllTransactions(), and onGoaway().
|
protected |
Definition at line 2822 of file HTTPSession.cpp.
References errorOnTransactionId(), proxygen::getErrorString(), proxygen::HTTPException::INGRESS_AND_EGRESS, folly::gen::move, proxygen::Exception::setProxygenError(), and string.
Referenced by errorOnAllTransactions(), invokeOnAllTransactions(), and onGoaway().
|
protected |
Get the HTTPTransaction for the given transaction ID, or nullptr if that transaction ID does not exist within this HTTPSession.
Definition at line 2545 of file HTTPSession.cpp.
References transactions_.
Referenced by detach(), errorOnTransactionId(), invokeOnAllTransactions(), onAbort(), onBody(), onChunkComplete(), onChunkHeader(), onError(), onExMessageBegin(), onHeadersComplete(), onMessageBegin(), onMessageComplete(), proxygen::HTTPDownstreamSession::onNativeProtocolUpgrade(), onNativeProtocolUpgradeImpl(), onPriority(), onPushMessageBegin(), onTrailersComplete(), onWindowUpdate(), pauseIngress(), resumeIngress(), sessionByteOffset(), and setNewTransactionPauseState().
|
protectednoexcept |
Definition at line 425 of file HTTPSession.cpp.
References g(), proxygen::HTTPSessionBase::setCloseReason(), shutdownTransport(), and proxygen::TIMEOUT.
Referenced by getHTTPPriority(), and proxygen::HTTPSession::FlowControlTimeout::timeoutExpired().
|
inline |
Definition at line 88 of file HTTPSession.h.
References byteEventTracker_, setByteEventTracker(), setEgressSettings(), setFlowControl(), and setSessionStats().
|
private |
Definition at line 185 of file HTTPSession.cpp.
References folly::IOBuf::computeChainDataLength(), fizz::extensions::test::ekm, getTransport(), folly::AsyncTransportWrapper::getUnderlyingTransport(), isUpstream(), fizz::test::label, uint16_t, and uint32_t.
Referenced by getMaxConcurrentOutgoingStreamsRemote(), and setupCodec().
|
inlineoverrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 438 of file HTTPSession.h.
References proxygen::HTTPSessionBase::codec_, and proxygen::FilterChain< T1, T2, FilterType, set_callback, TakeOwnership >::getChainEnd().
|
protected |
Definition at line 712 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::getDefaultWindowSize(), proxygen::HTTPCodec::getIngressSettings(), proxygen::HTTPSettings::getSetting(), proxygen::INITIAL_WINDOW_SIZE, and settings.
Referenced by createTransaction(), onHeadersSent(), and onNativeProtocolUpgradeImpl().
|
overridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 2019 of file HTTPSession.cpp.
References wangle::TransportInfo::appProtocol, getCurrentTransportInfoWithoutUpdate(), wangle::TransportInfo::rtt, wangle::TransportInfo::rtx, wangle::TransportInfo::secure, wangle::TransportInfo::setupTime, wangle::TransportInfo::sslCipher, wangle::TransportInfo::sslError, wangle::TransportInfo::sslResume, wangle::TransportInfo::sslSetupTime, wangle::TransportInfo::sslVersion, and proxygen::HTTPSessionBase::transportInfo_.
Referenced by getSetupTransportInfo().
|
overridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 2009 of file HTTPSession.cpp.
References wangle::TransportInfo::initWithSocket(), and sock_.
Referenced by getCurrentTransportInfo(), and timeoutExpired().
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 65 of file HTTPSession.h.
References sock_.
|
private |
Get the id of the stream we should ack in a graceful GOAWAY
Definition at line 2899 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::getLastIncomingStreamID(), proxygen::HTTPCodec::isReusable(), proxygen::HTTPCodec::isWaitingToDrain(), and max.
Referenced by drainImpl(), getMaxConcurrentOutgoingStreamsRemote(), and startNow().
|
inlineoverridevirtual |
Reimplemented from proxygen::HTTPSessionBase.
Definition at line 114 of file HTTPSession.h.
References proxygen::HTTPSessionBase::getHTTP2PrioritiesEnabled().
Referenced by getMessagePriority(), onPriority(), and sendHeaders().
|
inlineoverrideprotectedvirtual |
Implements proxygen::HTTPSessionBase.
Reimplemented in proxygen::HTTPUpstreamSession.
Definition at line 339 of file HTTPSession.h.
References flowControlTimeoutExpired(), getReadBuffer(), isBufferMovable(), folly::pushmi::__adl::noexcept(), folly::none, processReadData(), readBufferAvailable(), readDataAvailable(), readEOF(), readErr(), readTimeoutExpired(), and writeTimeoutExpired().
Referenced by proxygen::HTTPUpstreamSession::getHTTPPriority().
|
inlineoverridevirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 122 of file HTTPSession.h.
References proxygen::HTTPSessionBase::getLocalAddress().
Referenced by describe(), and proxygen::HTTPDownstreamSession::getTransactionTimeoutHandler().
|
inlineoverrideprivatevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 720 of file HTTPSession.h.
References proxygen::_SPDY_INVALID_STREAM, addAckToLastByteEvent(), addLastByteEvent(), getCertAuthSettingVal(), getGracefulGoawayAck(), getMessagePriority(), invalidStream(), isDownstream(), isUpstream(), maxConcurrentOutgoingStreamsRemote_, folly::pushmi::__adl::noexcept(), onConnectionSendWindowClosed(), onConnectionSendWindowOpen(), onEgressBufferCleared(), onEgressBuffered(), onSetMaxInitiatedStreams(), onSetSendWindow(), setupCodec(), uint32_t, uint64_t, value, and verifyCertAuthSetting().
|
private |
Definition at line 737 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::http2::DefaultPriority, proxygen::http2::PriorityUpdate::exclusive, getHTTP2PrioritiesEnabled(), proxygen::HTTPMessage::getHTTP2Priority(), proxygen::HTTPMessage::getPriority(), proxygen::HTTPCodec::mapPriorityToDependency(), proxygen::http2::PriorityUpdate::streamDependency, and proxygen::http2::PriorityUpdate::weight.
Referenced by getMaxConcurrentOutgoingStreamsRemote(), onExMessageBegin(), onMessageBegin(), onPushMessageBegin(), and sendHeaders().
|
protected |
Gets the next IOBuf to send (either writeBuf_ or new egress from the priority queue), and sets cork appropriately
Definition at line 2043 of file HTTPSession.cpp.
References byteEventTracker_, bytesWritten_, folly::IOBufQueue::chainLength(), proxygen::HTTPSessionBase::codec_, connFlowControl_, proxygen::HTTPSessionBase::egressBodySizeLimit_, proxygen::HTTP2PriorityQueue::empty(), folly::IOBufQueue::empty(), proxygen::FlowControlFilter::getAvailableSend(), proxygen::HTTPCodec::getProtocol(), isConnWindowFull(), proxygen::isSpdyCodecProtocol(), min, folly::IOBufQueue::move(), proxygen::HTTP2PriorityQueue::nextEgress(), nextEgressResults_, numActiveWrites_, proxygen::TTLBAStats::recordTTLBAIOBSplitByEom(), proxygen::HTTPSessionBase::sessionStats_, folly::IOBufQueue::split(), txnEgressQueue_, uint32_t, uint64_t, writeBuf_, and writesShutdown().
Referenced by onHeadersSent(), and runLoopCallback().
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 84 of file HTTPSession.h.
References incomingStreams_.
Referenced by proxygen::HTTPUpstreamSession::isDetachable().
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 80 of file HTTPSession.h.
References outgoingStreams_.
|
inlineoverridevirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 126 of file HTTPSession.h.
References proxygen::HTTPSessionBase::getPeerAddress().
Referenced by describe(), and shutdownTransport().
|
inlineprivate |
Definition at line 835 of file HTTPSession.h.
References incomingStreams_, incrementOutgoingStreams(), isDownstream(), maybeResumePausedPipelinedTransaction(), and uint32_t.
Referenced by detach(), maybeResumePausedPipelinedTransaction(), onEgressMessageFinished(), and onMessageBegin().
|
overrideprotectedvirtual |
When data becomes available, getReadBuffer() will be invoked to get the buffer into which data should be read.
This method allows the ReadCallback to delay buffer allocation until data becomes available. This allows applications to manage large numbers of idle connections, without having to maintain a separate read buffer for each idle connection.
It is possible that in some cases, getReadBuffer() may be called multiple times before readDataAvailable() is invoked. In this case, the data will be written to the buffer returned from the most recent call to readDataAvailable(). If the previous calls to readDataAvailable() returned different buffers, the ReadCallback is responsible for ensuring that they are not leaked.
If getReadBuffer() throws an exception, returns a nullptr buffer, or returns a 0 length, the ReadCallback will be uninstalled and its readError() method will be invoked.
getReadBuffer() is not allowed to change the transport state before it returns. (For example, it should never uninstall the read callback, or set a different read callback.)
bufReturn | getReadBuffer() should update *bufReturn to contain the address of the read buffer. This parameter will never be nullptr. |
lenReturn | getReadBuffer() should update *lenReturn to contain the maximum number of bytes that may be written to the read buffer. This parameter will never be nullptr. |
Implements folly::AsyncReader::ReadCallback.
Definition at line 526 of file HTTPSession.cpp.
References FOLLY_SCOPED_TRACE_SECTION, fizz::kMinReadSize, proxygen::HTTPSessionBase::maxReadBufferSize_, folly::IOBufQueue::preallocate(), and readBuf_.
Referenced by getHTTPPriority().
SecondaryAuthManager * proxygen::HTTPSession::getSecondAuthManager | ( | ) | const |
Get the SecondaryAuthManager attached to this session.
Definition at line 1821 of file HTTPSession.cpp.
References secondAuthManager_.
Referenced by connCloseByRemote().
|
inlineoverrideprotectedvirtual |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 358 of file HTTPSession.h.
References folly::pushmi::operators::error(), onAbort(), onBody(), onCertificate(), onCertificateRequest(), onChunkComplete(), onChunkHeader(), onError(), onExMessageBegin(), onGoaway(), onHeadersComplete(), onMessageBegin(), onMessageComplete(), onPingReply(), onPingRequest(), onPriority(), onPushMessageBegin(), onSettings(), onSettingsAck(), onTrailersComplete(), onWindowUpdate(), settings, sock_, uint16_t, uint32_t, and uint64_t.
|
inlineoverridevirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 130 of file HTTPSession.h.
References getCurrentTransportInfo(), proxygen::HTTPSessionBase::getSetupTransportInfo(), sendCertificateRequest(), sendPing(), sendPriority(), sendSettings(), setEgressBytesLimit(), setMaxConcurrentIncomingStreams(), startNow(), uint32_t, and uint64_t.
|
protectedpure virtual |
Called by transactionTimeout if the transaction has no handler.
Implemented in proxygen::HTTPUpstreamSession, and proxygen::HTTPDownstreamSession.
Referenced by connCloseByRemote(), and transactionTimeout().
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 61 of file HTTPSession.h.
References sock_.
Referenced by connCloseByRemote(), getCertAuthSettingVal(), onCertificate(), onCertificateRequest(), and verifyCertAuthSetting().
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 72 of file HTTPSession.h.
References sock_.
|
inlineoverridevirtualnoexcept |
Implements proxygen::HTTPSessionBase.
Definition at line 57 of file HTTPSession.h.
References proxygen::HTTPSessionBase::HTTP.
|
inlineoverrideprotectedvirtualnoexcept |
Returns the underlying AsyncTransportWrapper. Overrides HTTPTransaction::Transport::getUnderlyingTransport().
Implements proxygen::HTTPTransaction::Transport.
Definition at line 446 of file HTTPSession.h.
References sock_.
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 76 of file HTTPSession.h.
References transactions_.
|
protected |
Check whether the session has any writes in progress or upcoming
Definition at line 2800 of file HTTPSession.cpp.
References proxygen::HTTP2PriorityQueue::empty(), folly::IOBufQueue::front(), numActiveWrites_, pendingWrites_, txnEgressQueue_, and writeBuf_.
Referenced by closeWhenIdle(), detach(), dropConnection(), proxygen::HTTPUpstreamSession::isReusable(), onWriteSuccess(), runLoopCallback(), sessionByteOffset(), and shutdownTransport().
|
protected |
Immediately shut down the session, by deleting the loop callbacks first
Definition at line 479 of file HTTPSession.cpp.
References folly::EventBase::LoopCallback::cancelLoopCallback(), checkForShutdown(), folly::EventBase::LoopCallback::isLoopCallbackScheduled(), shutdownTransportCb_, transactions_, and writesShutdown().
Referenced by dropConnection(), and sessionByteOffset().
|
private |
Definition at line 2625 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::onNewOutgoingStream(), and outgoingStreams_.
Referenced by createTransaction(), getPipelineStreamCount(), and sendHeaders().
|
private |
Invoked when the codec processes callbacks for a stream we are no longer tracking.
Definition at line 2910 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::ERROR, proxygen::HTTPException::INGRESS_AND_EGRESS, onError(), proxygen::HTTPException::setCodecStatusCode(), and proxygen::HTTPCodec::supportsParallelRequests().
Referenced by getMaxConcurrentOutgoingStreamsRemote(), onBody(), onChunkComplete(), onChunkHeader(), onError(), onExMessageBegin(), onHeadersComplete(), onMessageComplete(), onPushMessageBegin(), and onTrailersComplete().
|
inlineprotected |
This function invokes a callback on all transactions. It is safe, but runs in O(n*log n) and if the callback adds transactions, they will not get the callback.
Definition at line 584 of file HTTPSession.h.
References drainImpl(), errorOnAllTransactions(), errorOnTransactionId(), errorOnTransactionIds(), findTransaction(), g(), pauseReadsImpl(), resumeReadsImpl(), resumeTransactions(), shouldShutdown(), string, and transactions_.
Referenced by onGoaway(), onSetSendWindow(), resumeTransactions(), runLoopCallback(), shutdownTransport(), and updateWriteBufSize().
|
overrideprotectedvirtualnoexcept |
When data becomes available, isBufferMovable() will be invoked to figure out which API will be used, readBufferAvailable() or readDataAvailable(). If isBufferMovable() returns true, that means ReadCallback supports the IOBuf ownership transfer and readBufferAvailable() will be used. Otherwise, not.
By default, isBufferMovable() always return false. If readBufferAvailable() is implemented and to be invoked, You should overwrite isBufferMovable() and return true in the inherited class.
This method allows the AsyncSocket/AsyncSSLSocket do buffer allocation by itself until data becomes available. Compared with the pre/post buffer allocation in getReadBuffer()/readDataAvailabe(), readBufferAvailable() has two advantages. First, this can avoid memcpy. E.g., in AsyncSSLSocket, the decrypted data was copied from the openssl internal buffer to the readbuf buffer. With the buffer ownership transfer, the internal buffer can be directly "moved" to ReadCallback. Second, the memory allocation can be more precise. The reason is AsyncSocket/AsyncSSLSocket can allocate the memory of precise size because they have more context about the available data than ReadCallback. Think about the getReadBuffer() pre-allocate 4072 bytes buffer, but the available data is always 16KB (max OpenSSL record size).
Reimplemented from folly::AsyncReader::ReadCallback.
Definition at line 552 of file HTTPSession.cpp.
Referenced by getHTTPPriority().
|
overridevirtual |
Check whether the connection has any requests outstanding.
Implements wangle::ManagedConnection.
Definition at line 448 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::isBusy(), and transactions_.
Referenced by closeWhenIdle(), and timeoutExpired().
|
inlineprivate |
Definition at line 765 of file HTTPSession.h.
References commonEom(), connFlowControl_, proxygen::FlowControlFilter::getAvailableSend(), int64_t, folly::pushmi::__adl::noexcept(), onDeleteAckEvent(), onLastByteEvent(), onPingReplyLatency(), and uint64_t.
Referenced by getNextToSend().
|
private |
Definition at line 521 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::DOWNSTREAM, and proxygen::HTTPCodec::getTransportDirection().
Referenced by createTransaction(), decrementTransactionCount(), describe(), getMaxConcurrentOutgoingStreamsRemote(), getPipelineStreamCount(), newPushedTransaction(), onAbort(), onMessageBegin(), onPushMessageBegin(), proxygen::HTTPSession::ShutdownTransportCallback::runLoopCallback(), sendHeaders(), and setupCodec().
|
inlineoverrideprotectedvirtual |
Returns true if this session is draining. This can happen if drain() is called explicitly, if a GOAWAY frame is received, or during shutdown.
Implements proxygen::HTTPTransaction::Transport.
Definition at line 455 of file HTTPSession.h.
References drain(), draining_, int64_t, runLoopCallback(), scheduleWrite(), shutdownTransport(), shutdownTransportWithReset(), string, updateWriteBufSize(), and updateWriteCount().
|
private |
Definition at line 517 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::getTransportDirection(), and proxygen::UPSTREAM.
Referenced by createTransaction(), decrementTransactionCount(), drain(), getCertAuthSettingVal(), getMaxConcurrentOutgoingStreamsRemote(), onCertificate(), onCertificateRequest(), onGoaway(), sendHeaders(), shouldShutdown(), and verifyCertAuthSetting().
|
private |
Definition at line 1879 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, getPipelineStreamCount(), proxygen::HTTPCodec::supportsParallelRequests(), and transactions_.
Referenced by detach(), getPipelineStreamCount(), and onEgressMessageFinished().
|
inlineoverrideprivatevirtual |
This is a temporary workaround until we have a better way to allocate stream IDs to waiting transactions.
Implements proxygen::HTTPTransaction::Transport.
Definition at line 822 of file HTTPSession.h.
References onReplaySafe(), and waitingForReplaySafety_.
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 681 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::createStream(), createTransaction(), draining_, proxygen::ENABLE_EX_HEADERS, proxygen::ERROR, proxygen::getCodecProtocolString(), proxygen::HTTPCodec::getEgressSettings(), proxygen::HTTPTransaction::getID(), proxygen::HTTPCodec::getProtocol(), handler(), maxConcurrentOutgoingStreamsRemote_, proxygen::HTTPCodec::NoStream, outgoingStreams_, proxygen::HTTPTransaction::setHandler(), setNewTransactionPauseState(), and started_.
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 649 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::createStream(), createTransaction(), draining_, FOLLY_NULLABLE, proxygen::HTTPTransaction::getID(), handler(), isDownstream(), maxConcurrentOutgoingStreamsRemote_, proxygen::HTTPCodec::NoExAttributes, outgoingStreams_, proxygen::HTTPTransaction::setHandler(), setNewTransactionPauseState(), and proxygen::HTTPCodec::supportsPushTransactions().
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1997 of file HTTPSession.cpp.
References folly::EventBase::LoopCallback::isLoopCallbackScheduled(), pendingWriteSizeDelta_, sock_, and updateWriteBufSize().
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1986 of file HTTPSession.cpp.
References connFlowControl_, proxygen::FlowControlFilter::ingressBytesProcessed(), proxygen::HTTPSessionBase::notifyBodyProcessed(), resumeReads(), scheduleWrite(), and writeBuf_.
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 453 of file HTTPSession.cpp.
References scheduleWrite().
Referenced by numIncomingStreams().
|
overridevirtual |
Notify the connection that a shutdown is pending. This method will be called at the beginning of graceful shutdown.
Implements wangle::ManagedConnection.
Definition at line 458 of file HTTPSession.cpp.
References drain().
Referenced by readTimeoutExpired(), and timeoutExpired().
|
inlineoverrideprotectedvirtual |
Return the number of open streams started by the remote side. Parallel codecs with a maximum number of streams will invoke this to determine if a new stream exceeds the limit.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 401 of file HTTPSession.h.
References detach(), handler(), incomingStreams_, int64_t, newExTransaction(), newPushedTransaction(), notifyEgressBodyBuffered(), notifyIngressBodyProcessed(), notifyPendingEgress(), pauseIngress(), resumeIngress(), sendAbort(), sendBody(), sendChunkHeader(), sendChunkTerminator(), sendEOM(), sendHeaders(), sendPriority(), sendWindowUpdate(), folly::size(), statusCode, transactionTimeout(), and uint32_t.
|
inlineoverrideprotectedvirtual |
Return the number of open streams started by this codec callback. Parallel codecs with a maximum number of streams will invoke this to determine if a new stream exceeds the limit.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 398 of file HTTPSession.h.
References outgoingStreams_.
|
overrideprotectedvirtual |
Called when the peer has asked to shut down a stream immediately.
stream | The stream ID |
code | The code the stream was aborted with |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1163 of file HTTPSession.cpp.
References proxygen::CANCEL, findTransaction(), proxygen::HTTPTransaction::getAssocTxnId(), proxygen::getErrorCodeString(), proxygen::HTTPTransaction::getExTransactions(), proxygen::HTTPTransaction::getPushedTransactions(), proxygen::HTTPException::INGRESS_AND_EGRESS, isDownstream(), proxygen::kErrorStreamAbort, proxygen::HTTPTransaction::onError(), proxygen::HTTPException::setCodecStatusCode(), proxygen::Exception::setProxygenError(), and streamID.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called for each block of message body data
stream | The stream ID |
chain | One or more buffers of body data. The codec will remove any protocol framing, such as HTTP/1.1 chunk headers, from the buffers before calling this function. |
padding | Number of pad bytes that came with the data segment |
Implements proxygen::HTTPCodec::Callback.
Definition at line 970 of file HTTPSession.cpp.
References folly::IOBuf::computeChainDataLength(), connFlowControl_, findTransaction(), FOLLY_SCOPED_TRACE_SECTION, proxygen::FlowControlFilter::ingressBytesProcessed(), invalidStream(), folly::gen::move, proxygen::HTTPSessionBase::onBodyImpl(), pauseReads(), scheduleWrite(), uint64_t, and writeBuf_.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called upon receipt of an authenticator, for protocols that support secondary certificate authentication.
certId | The Cert-ID identifying this authenticator |
authenticator | The authenticator request |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1380 of file HTTPSession.cpp.
References proxygen::DOWNSTREAM, getTransport(), folly::AsyncTransportWrapper::getUnderlyingTransport(), isUpstream(), folly::gen::move, secondAuthManager_, and proxygen::UPSTREAM.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called upon receipt of a certificate request frame, for protocols that support secondary certificate authentication.
requestId | The Request-ID identifying the certificate request |
authRequest | The authenticator request |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1347 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::DOWNSTREAM, proxygen::HTTPCodec::generateCertificate(), getTransport(), folly::AsyncTransportWrapper::getUnderlyingTransport(), isUpstream(), folly::gen::move, scheduleWrite(), secondAuthManager_, proxygen::UPSTREAM, and writeBuf_.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called when the terminating CRLF is received to end a chunk of HTTP body data.
stream | The stream ID |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1018 of file HTTPSession.cpp.
References findTransaction(), invalidStream(), and proxygen::HTTPTransaction::onIngressChunkComplete().
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called for each HTTP chunk header.
onChunkHeader() will be called when the chunk header is received. As the chunk data arrives, it will be passed to the callback normally with onBody() calls. Note that the chunk data may arrive in multiple onBody() calls: it is not guaranteed to arrive in a single onBody() call.
After the chunk data has been received and the terminating CRLF has been received, onChunkComplete() will be called.
stream | The stream ID |
length | The chunk length. |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 993 of file HTTPSession.cpp.
References findTransaction(), invalidStream(), and proxygen::HTTPTransaction::onIngressChunkHeader().
Referenced by getSecurityProtocol().
|
overrideprivatevirtual |
Implements proxygen::FlowControlFilter::Callback.
Definition at line 2880 of file HTTPSession.cpp.
References proxygen::HTTP2PriorityQueue::empty(), flowControlTimeout_, proxygen::HTTPSession::FlowControlTimeout::getTimeoutDuration(), proxygen::HTTPSessionBase::infoCallback_, folly::HHWheelTimer::Callback::isScheduled(), proxygen::HTTPSessionBase::InfoCallback::onFlowControlWindowClosed(), proxygen::HTTPSessionStats::recordSessionStalled(), proxygen::WheelTimerInstance::scheduleTimeout(), proxygen::HTTPSessionBase::sessionStats_, timeout_, and txnEgressQueue_.
Referenced by getMaxConcurrentOutgoingStreamsRemote().
|
overrideprivatevirtual |
Callback function from the flow control filter if the full window becomes not full.
Implements proxygen::FlowControlFilter::Callback.
Definition at line 2874 of file HTTPSession.cpp.
References folly::HHWheelTimer::Callback::cancelTimeout(), flowControlTimeout_, and scheduleWrite().
Referenced by getMaxConcurrentOutgoingStreamsRemote().
|
overrideprivatevirtualnoexcept |
Implements proxygen::ByteEventTracker::Callback.
Definition at line 2930 of file HTTPSession.cpp.
References readsShutdown(), shutdownTransport(), and transactions_.
Referenced by isConnWindowFull().
|
overrideprivatevirtual |
Implements folly::AsyncTransport::BufferCallback.
Definition at line 2942 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, and proxygen::HTTPSessionBase::InfoCallback::onEgressBufferCleared().
Referenced by getMaxConcurrentOutgoingStreamsRemote().
|
overrideprivatevirtual |
Implements folly::AsyncTransport::BufferCallback.
Definition at line 2936 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, and proxygen::HTTPSessionBase::InfoCallback::onEgressBuffered().
Referenced by getMaxConcurrentOutgoingStreamsRemote().
|
protected |
Invoked when the transaction finishes sending a message and appropriately shuts down reads and/or writes with respect to downstream or upstream semantics.
Definition at line 1714 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, decrementTransactionCount(), proxygen::HTTPTransaction::getMaxDeferredSize(), getPipelineStreamCount(), proxygen::HTTPTransaction::getSequenceNumber(), proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPCodec::isReusable(), maybeResumePausedPipelinedTransaction(), proxygen::HTTPSessionBase::InfoCallback::onRequestEnd(), readsShutdown(), resetAfterDrainingWrites_, proxygen::HTTPSessionBase::setCloseReason(), shutdownTransport(), shutdownTransportCb_, sock_, proxygen::TRANSACTION_ABORT, and transactions_.
Referenced by commonEom(), onHeadersSent(), and sendAbort().
|
overrideprotectedvirtual |
Called when a parsing or protocol error has occurred
stream | The stream ID |
error | Description of the error |
newTxn | true if onMessageBegin has not been called for txn |
Implements proxygen::HTTPCodec::Callback.
Definition at line 1099 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, createTransaction(), folly::pushmi::operators::error(), findTransaction(), proxygen::HTTPTransaction::getEgressState(), proxygen::HTTPTransaction::getHandler(), proxygen::HTTPSessionBase::handleErrorDirectly(), proxygen::HTTPSessionBase::infoCallback_, ingressError_, invalidStream(), proxygen::HTTPCodec::isReusable(), proxygen::kErrorMessage, proxygen::HTTPCodec::NoExAttributes, proxygen::HTTPCodec::NoStream, proxygen::HTTPTransaction::onError(), proxygen::HTTPSessionBase::InfoCallback::onIngressError(), onNewTransactionParseError(), proxygen::HTTPSessionBase::InfoCallback::onRequestBegin(), onSessionParseError(), proxygen::SESSION_PARSE_ERROR, proxygen::HTTPSessionBase::setCloseReason(), shutdownTransport(), proxygen::HTTPCodec::supportsParallelRequests(), and transactions_.
Referenced by getSecurityProtocol(), invalidStream(), onHeadersComplete(), and onPushMessageBegin().
|
overrideprotectedvirtual |
Called when a new extended message is seen while parsing the ingress.
stream | The stream ID |
controlStream | The stream ID of the associated stream, which can never be 0 |
msg | A newly allocated HTTPMessage |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 860 of file HTTPSession.cpp.
References createTransaction(), proxygen::ERROR, findTransaction(), getMessagePriority(), proxygen::HTTPSessionBase::infoCallback_, invalidStream(), proxygen::HTTPTransaction::isIngressPaused(), proxygen::HTTPCodec::NoStream, proxygen::HTTPSessionBase::InfoCallback::onRequestBegin(), and proxygen::PROTOCOL_ERROR.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called upon receipt of a goaway.
lastGoodStreamID | Last successful stream created by the receiver |
code | The code the connection was aborted with |
debugData | The additional debug data for diagnostic purpose |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1199 of file HTTPSession.cpp.
References folly::IOBuf::data(), drain(), errorOnTransactionId(), errorOnTransactionIds(), g(), proxygen::getErrorCodeString(), proxygen::getErrorString(), proxygen::GOAWAY, proxygen::HTTPException::INGRESS_AND_EGRESS, invokeOnAllTransactions(), isUpstream(), proxygen::kErrorStreamUnacknowledged, folly::gen::move, proxygen::NO_ERROR, proxygen::HTTPCodec::NoStream, proxygen::HTTPTransaction::onGoaway(), proxygen::HTTPSessionBase::setCloseReason(), proxygen::Exception::setProxygenError(), streamID, and transactions_.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called when all the headers of an ingress message have been parsed
stream | The stream ID |
msg | The message |
size | Size of the ingress header |
Implements proxygen::HTTPCodec::Callback.
Definition at line 899 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, findTransaction(), proxygen::HTTPTransaction::getControlStream(), proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPException::INGRESS_AND_EGRESS, invalidStream(), proxygen::HTTPTransaction::isRemoteInitiated(), proxygen::HTTPCodec::isReusable(), folly::gen::move, onError(), proxygen::HTTPSessionBase::InfoCallback::onIngressMessage(), proxygen::REFUSED_STREAM, proxygen::REQ_NOTREUSABLE, wangle::TransportInfo::secure, proxygen::HTTPSessionBase::setCloseReason(), proxygen::HTTPException::setCodecStatusCode(), setupOnHeadersComplete(), wangle::TransportInfo::sslCipher, wangle::TransportInfo::sslVersion, streamID, and proxygen::HTTPSessionBase::transportInfo_.
Referenced by getSecurityProtocol().
|
inlineprotectedvirtual |
Invoked when headers have been sent.
Reimplemented in proxygen::HTTPDownstreamSession.
Definition at line 300 of file HTTPSession.h.
References allTransactionsStarted(), decrementTransactionCount(), getCodecSendWindowSize(), getNextToSend(), onEgressMessageFinished(), onNativeProtocolUpgradeImpl(), sendPriorityImpl(), setNewTransactionPauseState(), streamID, and string.
Referenced by sendHeaders().
|
overrideprivatevirtualnoexcept |
Implements proxygen::ByteEventTracker::Callback.
Definition at line 2962 of file HTTPSession.cpp.
References byteEventTracker_, and sock_.
Referenced by isConnWindowFull().
|
overrideprotectedvirtual |
Called when a new message is seen while parsing the ingress
stream | The stream ID |
msg | A newly allocated HTTPMessage |
Implements proxygen::HTTPCodec::Callback.
Definition at line 758 of file HTTPSession.cpp.
References byteEventTracker_, proxygen::HTTPSessionBase::codec_, createTransaction(), findTransaction(), getMessagePriority(), getPipelineStreamCount(), proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPException::INGRESS_AND_EGRESS, isDownstream(), proxygen::HTTPTransaction::isPushed(), liveTransactions_, proxygen::HTTPCodec::NoExAttributes, proxygen::HTTPCodec::NoStream, proxygen::HTTPTransaction::onError(), proxygen::HTTPSessionBase::InfoCallback::onRequestBegin(), readsPaused(), readsUnpaused(), proxygen::HTTPException::setCodecStatusCode(), proxygen::STREAM_CLOSED, proxygen::HTTPCodec::supportsParallelRequests(), and transactions_.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called at end of a message (including body and trailers, if applicable)
stream | The stream ID |
upgrade | Whether the connection has been upgraded to another protocol. |
Implements proxygen::HTTPCodec::Callback.
Definition at line 1041 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, decrementTransactionCount(), proxygen::HTTPTransaction::extraResponseExpected(), findTransaction(), ingressUpgraded_, invalidStream(), proxygen::HTTPTransaction::isDownstream(), proxygen::HTTPCodec::isReusable(), proxygen::HTTPTransaction::onIngressEOM(), proxygen::HTTPTransaction::onIngressUpgrade(), shutdownTransport(), streamID, proxygen::HTTPCodec::supportsParallelRequests(), and proxygen::TCP.
Referenced by getSecurityProtocol().
|
protected |
Definition at line 1413 of file HTTPSession.cpp.
References wangle::TransportInfo::appProtocol, proxygen::HTTPSessionBase::codec_, connFlowControl_, proxygen::HTTPCodec::createStream(), findTransaction(), getCodecSendWindowSize(), proxygen::HTTPCodec::getDefaultWindowSize(), proxygen::HTTPCodec::getEgressSettings(), proxygen::INITIAL_WINDOW_SIZE, initialReceiveWindow_, maxConcurrentIncomingStreams_, maxConcurrentOutgoingStreamsRemote_, folly::gen::move, proxygen::HTTPSessionBase::onCodecChanged(), receiveSessionWindowSize_, receiveStreamWindowSize_, proxygen::HTTPTransaction::reset(), scheduleWrite(), wangle::TransportInfo::secure, sendSettings(), proxygen::FilterChain< T1, T2, FilterType, set_callback, TakeOwnership >::setDestination(), proxygen::FlowControlFilter::setReceiveWindowSize(), proxygen::HTTPSettings::setSetting(), settings, setupCodec(), sock_, proxygen::HTTPCodec::supportsParallelRequests(), proxygen::HTTPCodec::supportsStreamFlowControl(), proxygen::HTTPSessionBase::transportInfo_, and writeBuf_.
Referenced by onHeadersSent(), proxygen::HTTPDownstreamSession::onNativeProtocolUpgrade(), and proxygen::HTTPUpstreamSession::onNativeProtocolUpgrade().
|
protected |
Send a transaction abort and leave the session and transport intact.
Definition at line 2742 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateRstStream(), proxygen::HTTPException::getCodecStatusCode(), proxygen::HTTPException::hasCodecStatusCode(), proxygen::HTTPCodec::isReusable(), scheduleWrite(), proxygen::SESSION_PARSE_ERROR, proxygen::HTTPSessionBase::setCloseReason(), and writeBuf_.
Referenced by onError(), and sessionByteOffset().
|
overrideprotectedvirtual |
Called upon receipt of a ping reply
uniqueID | Unique identifier for the ping |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1278 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, and proxygen::HTTPSessionBase::InfoCallback::onPingReplyReceived().
Referenced by getSecurityProtocol().
|
overrideprivatevirtualnoexcept |
Implements proxygen::ByteEventTracker::Callback.
Definition at line 2924 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, and proxygen::HTTPSessionBase::InfoCallback::onPingReplySent().
Referenced by isConnWindowFull().
|
overrideprotectedvirtual |
Called upon receipt of a ping request
uniqueID | Unique identifier for the ping |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1259 of file HTTPSession.cpp.
References folly::IOBufQueue::append(), byteEventTracker_, bytesScheduled_, folly::IOBufQueue::cacheChainLength(), folly::IOBufQueue::chainLength(), proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generatePingReply(), proxygen::getCurrentTime(), folly::IOBufQueue::move(), scheduleWrite(), and writeBuf_.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called upon receipt of a priority frame, for protocols that support dynamic priority
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1330 of file HTTPSession.cpp.
References proxygen::HTTP2PriorityQueue::addOrUpdatePriorityNode(), findTransaction(), getHTTP2PrioritiesEnabled(), and txnEgressQueue_.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called when a new push message is seen while parsing the ingress.
stream | The stream ID |
assocStream | The stream ID of the associated stream, which can never be 0 |
msg | A newly allocated HTTPMessage |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 813 of file HTTPSession.cpp.
References createTransaction(), findTransaction(), getMessagePriority(), proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPException::INGRESS_AND_EGRESS, invalidStream(), isDownstream(), proxygen::HTTPTransaction::isIngressEOMSeen(), proxygen::HTTPCodec::NoExAttributes, onError(), proxygen::HTTPTransaction::onPushedTransaction(), proxygen::HTTPSessionBase::InfoCallback::onRequestBegin(), proxygen::PROTOCOL_ERROR, proxygen::REFUSED_STREAM, and proxygen::HTTPException::setCodecStatusCode().
Referenced by getSecurityProtocol().
|
overrideprivatevirtualnoexcept |
Callback from the transport to this HTTPSession to signal when the transport has become replay safe.
Implements folly::AsyncTransport::ReplaySafetyCallback.
Definition at line 2948 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPSessionBase::InfoCallback::onFullHandshakeCompletion(), sock_, and waitingForReplaySafety_.
Referenced by needToBlockForReplaySafety().
|
protected |
Send a session layer abort and shutdown the transport for reads and writes.
Definition at line 2726 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, folly::IOBuf::copyBuffer(), proxygen::HTTPCodec::generateGoaway(), proxygen::HTTPException::getCodecStatusCode(), proxygen::HTTPCodec::getLastIncomingStreamID(), proxygen::HTTPCodec::getProtocol(), proxygen::HTTPException::hasCodecStatusCode(), proxygen::isHTTP2CodecProtocol(), folly::gen::move, scheduleWrite(), proxygen::SESSION_PARSE_ERROR, proxygen::HTTPSessionBase::setCloseReason(), shutdownTransport(), proxygen::Exception::what(), and writeBuf_.
Referenced by onError(), and sessionByteOffset().
|
private |
Definition at line 1481 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, maxConcurrentOutgoingStreamsRemote_, proxygen::HTTPSessionBase::InfoCallback::onSettingsOutgoingStreamsFull(), proxygen::HTTPSessionBase::InfoCallback::onSettingsOutgoingStreamsNotFull(), and proxygen::HTTPSessionBase::supportsMoreTransactions().
Referenced by getMaxConcurrentOutgoingStreamsRemote(), and onSettings().
|
private |
Definition at line 1475 of file HTTPSession.cpp.
References invokeOnAllTransactions(), and proxygen::HTTPTransaction::onIngressSetSendWindow().
Referenced by getMaxConcurrentOutgoingStreamsRemote(), and onSettings().
|
overrideprotectedvirtual |
Called upon receipt of a settings frame, for protocols that support settings.
settings | a list of settings that were sent in the settings frame |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1302 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, g(), proxygen::HTTPCodec::generateSettingsAck(), proxygen::HTTPSessionBase::infoCallback_, proxygen::INITIAL_WINDOW_SIZE, proxygen::MAX_CONCURRENT_STREAMS, onSetMaxInitiatedStreams(), onSetSendWindow(), proxygen::HTTPSessionBase::InfoCallback::onSettings(), scheduleWrite(), proxygen::SETTINGS_HTTP_CERT_AUTH, verifyCertAuthSetting(), and writeBuf_.
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called upon receipt of a settings frame with ACK set, for protocols that support settings ack.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1323 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, and proxygen::HTTPSessionBase::InfoCallback::onSettingsAck().
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called when all the trailers of an ingress message have been parsed, but only if the number of trailers is nonzero.
stream | The stream ID |
trailers | The message trailers |
Implements proxygen::HTTPCodec::Callback.
Definition at line 1030 of file HTTPSession.cpp.
References findTransaction(), invalidStream(), folly::gen::move, and proxygen::HTTPTransaction::onIngressTrailers().
Referenced by getSecurityProtocol().
|
overrideprotectedvirtual |
Called upon receipt of a window update, for protocols that support flow control. For instance spdy/3 and higher.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 1285 of file HTTPSession.cpp.
References findTransaction(), and proxygen::HTTPTransaction::onIngressWindowUpdate().
Referenced by getSecurityProtocol().
|
protected |
Check whether to shut down the transport after a write completes.
Definition at line 2708 of file HTTPSession.cpp.
References numActiveWrites_, pendingWrites_, shutdownTransport(), and writesDraining_.
Referenced by onWriteSuccess(), and sessionByteOffset().
|
protected |
Invoked by WriteSegment on write failure.
Definition at line 2690 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::infoCallback_, proxygen::IO_WRITE_ERROR, proxygen::kErrorWrite, proxygen::HTTPSessionBase::InfoCallback::onWrite(), proxygen::HTTPSessionBase::setCloseReason(), shutdownTransportWithReset(), folly::SSL_ERROR, wangle::TransportInfo::sslError, and proxygen::HTTPSessionBase::transportInfo_.
Referenced by sessionByteOffset(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
Invoked by WriteSegment on completion of a write.
Definition at line 2631 of file HTTPSession.cpp.
References byteEventTracker_, bytesWritten_, folly::HHWheelTimer::Callback::cancelTimeout(), proxygen::HTTPSessionBase::codec_, egressBytesLimit_, hasMoreWrites(), proxygen::HTTPSessionBase::infoCallback_, inLoopCallback_, proxygen::HTTPCodec::isReusable(), folly::HHWheelTimer::Callback::isScheduled(), numActiveWrites_, proxygen::HTTPSessionBase::InfoCallback::onWrite(), onWriteCompleted(), pendingWrites_, readsShutdown(), runLoopCallback(), proxygen::WheelTimerInstance::scheduleTimeout(), proxygen::HTTPSessionBase::setCloseReason(), shutdownTransport(), timeout_, wangle::TransportInfo::totalBytes, transactions_, proxygen::HTTPSessionBase::transportInfo_, proxygen::UNKNOWN, updateWriteBufSize(), updateWriteCount(), and writeTimeout_.
Referenced by sessionByteOffset(), and proxygen::HTTPSession::WriteSegment::writeSuccess().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1501 of file HTTPSession.cpp.
References findTransaction(), liveTransactions_, and pauseReads().
Referenced by numIncomingStreams().
|
protected |
Stop reading from the transport until resumeReads() is called
Definition at line 2757 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPSessionBase::ingressLimitExceeded(), pauseReadsImpl(), readsUnpaused(), proxygen::HTTPCodec::setParserPaused(), and proxygen::HTTPCodec::supportsParallelRequests().
Referenced by onBody(), pauseIngress(), and sessionByteOffset().
|
protected |
Definition at line 2769 of file HTTPSession.cpp.
References folly::HHWheelTimer::Callback::cancelTimeout(), proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPSessionBase::InfoCallback::onIngressPaused(), reads_, and sock_.
Referenced by proxygen::HTTPUpstreamSession::detachThreadLocals(), invokeOnAllTransactions(), and pauseReads().
|
protected |
Definition at line 575 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, FOLLY_SCOPED_TRACE_SECTION, folly::IOBufQueue::front(), ingressError_, folly::IOBuf::length(), proxygen::HTTPCodec::onIngress(), folly::IOBufQueue::pop_front(), readBuf_, readsUnpaused(), proxygen::HTTPCodec::setParserPaused(), and folly::IOBufQueue::trimStart().
Referenced by getHTTPPriority(), readBufferAvailable(), readDataAvailable(), and runLoopCallback().
|
overrideprotectedvirtualnoexcept |
readBufferAvailable() will be invoked when data has been successfully read.
Note that only either readBufferAvailable() or readDataAvailable() will be invoked according to the return value of isBufferMovable(). The timing and aftereffect of readBufferAvailable() are the same as readDataAvailable()
readBuf | The unique pointer of read buffer. |
Reimplemented from folly::AsyncReader::ReadCallback.
Definition at line 557 of file HTTPSession.cpp.
References folly::IOBufQueue::append(), FOLLY_SCOPED_TRACE_SECTION, proxygen::HTTPSessionBase::infoCallback_, folly::gen::move, proxygen::HTTPSessionBase::InfoCallback::onRead(), processReadData(), fizz::detail::readBuf(), readBuf_, and wangle::ManagedConnection::resetTimeout().
Referenced by getHTTPPriority().
|
overrideprotectedvirtualnoexcept |
readDataAvailable() will be invoked when data has been successfully read into the buffer returned by the last call to getReadBuffer().
The read callback remains installed after readDataAvailable() returns. It must be explicitly uninstalled to stop receiving read events. getReadBuffer() will be called at least once before each call to readDataAvailable(). getReadBuffer() will also be called before any call to readEOF().
len | The number of bytes placed in the buffer. |
Implements folly::AsyncReader::ReadCallback.
Definition at line 535 of file HTTPSession.cpp.
References FOLLY_SCOPED_TRACE_SECTION, proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPSessionBase::InfoCallback::onRead(), folly::IOBufQueue::postallocate(), processReadData(), readBuf_, and wangle::ManagedConnection::resetTimeout().
Referenced by getHTTPPriority().
|
overrideprotectedvirtualnoexcept |
readEOF() will be invoked when the transport is closed.
The read callback will be automatically uninstalled immediately before readEOF() is invoked.
Implements folly::AsyncReader::ReadCallback.
Definition at line 606 of file HTTPSession.cpp.
References folly::IOBufQueue::empty(), proxygen::HTTPSessionBase::getNumTxnServed(), folly::gen::guard(), proxygen::HTTPSessionBase::infoCallback_, proxygen::kErrorClientSilent, proxygen::HTTPSessionBase::InfoCallback::onIngressError(), proxygen::READ_EOF, readBuf_, wangle::TransportInfo::secure, proxygen::HTTPSessionBase::setCloseReason(), shutdownTransport(), transactions_, and proxygen::HTTPSessionBase::transportInfo_.
Referenced by getHTTPPriority().
|
overrideprotectedvirtualnoexcept |
readError() will be invoked if an error occurs reading from the transport.
The read callback will be automatically uninstalled immediately before readError() is invoked.
ex | An exception describing the error that occurred. |
Implements folly::AsyncReader::ReadCallback.
Definition at line 626 of file HTTPSession.cpp.
References folly::CLIENT_RENEGOTIATION, folly::gen::guard(), proxygen::HTTPSessionBase::infoCallback_, proxygen::IO_READ_ERROR, proxygen::kErrorClientRenegotiation, proxygen::HTTPSessionBase::InfoCallback::onIngressError(), proxygen::HTTPSessionBase::setCloseReason(), shutdownTransport(), folly::SSL_ERROR, wangle::TransportInfo::sslError, transactions_, and proxygen::HTTPSessionBase::transportInfo_.
Referenced by getHTTPPriority().
|
inlineprotected |
Definition at line 630 of file HTTPSession.h.
References reads_.
Referenced by onMessageBegin(), and resumeReads().
|
inlineprotected |
Definition at line 634 of file HTTPSession.h.
References reads_, and proxygen::SHUTDOWN.
Referenced by checkForShutdown(), detach(), dropConnection(), proxygen::HTTPUpstreamSession::isClosing(), onDeleteAckEvent(), onEgressMessageFinished(), onWriteSuccess(), shutdownTransport(), and shutdownTransportWithReset().
|
inlineprotected |
Definition at line 626 of file HTTPSession.h.
References reads_.
Referenced by onMessageBegin(), pauseReads(), processReadData(), and runLoopCallback().
|
protectednoexcept |
Definition at line 379 of file HTTPSession.cpp.
References drainTimeout_, proxygen::HTTPSessionBase::getController(), proxygen::HTTPSessionController::getGracefulShutdownTimeout(), liveTransactions_, notifyPendingShutdown(), wangle::ManagedConnection::resetTimeout(), proxygen::WheelTimerInstance::scheduleTimeout(), proxygen::HTTPSessionBase::setCloseReason(), proxygen::TIMEOUT, timeout_, and transactions_.
Referenced by getHTTPPriority(), and timeoutExpired().
|
inlineoverrideprivatenoexcept |
Remove a ReplaySafetyCallback that had been waiting for replay safety (eg if a transaction waiting for replay safety is canceled).
Definition at line 813 of file HTTPSession.h.
References waitingForReplaySafety_.
|
inlineprotected |
Definition at line 650 of file HTTPSession.h.
References folly::EventBase::LoopCallback::isLoopCallbackScheduled(), shutdownTransportCb_, and sock_.
Referenced by proxygen::HTTPUpstreamSession::attachThreadLocals().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1519 of file HTTPSession.cpp.
References findTransaction(), liveTransactions_, and resumeReads().
Referenced by detach(), and numIncomingStreams().
|
protected |
Unpause reading from the transport.
Definition at line 2780 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPSessionBase::ingressLimitExceeded(), readsPaused(), resumeReadsImpl(), and proxygen::HTTPCodec::supportsParallelRequests().
Referenced by detach(), notifyIngressBodyProcessed(), resumeIngress(), sessionByteOffset(), and startNow().
|
protected |
Definition at line 2789 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, folly::EventBase::LoopCallback::isLoopCallbackScheduled(), reads_, wangle::ManagedConnection::resetTimeout(), proxygen::HTTPCodec::setParserPaused(), and sock_.
Referenced by proxygen::HTTPUpstreamSession::attachThreadLocals(), invokeOnAllTransactions(), and resumeReads().
|
protected |
Definition at line 2850 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::egressLimitExceeded(), g(), inResume_, invokeOnAllTransactions(), proxygen::HTTP2PriorityQueue::iterateBFS(), proxygen::HTTPTransaction::pauseEgress(), pendingPause_, transactions_, and txnEgressQueue_.
Referenced by invokeOnAllTransactions(), and updateWriteBufSize().
|
overrideprotectedvirtualnoexcept |
Implements folly::EventBase::LoopCallback.
Definition at line 2137 of file HTTPSession.cpp.
References bodyBytesPerWriteBuf_, bytesScheduled_, checkForShutdown(), folly::IOBuf::computeChainDataLength(), connFlowControl_, proxygen::FlowControlFilter::getAvailableSend(), proxygen::HTTPSession::WriteSegment::getFlags(), getNextToSend(), hasMoreWrites(), i, inLoopCallback_, invokeOnAllTransactions(), proxygen::HTTPSessionBase::isPrioritySampled(), folly::HHWheelTimer::Callback::isScheduled(), folly::makeGuard(), folly::gen::move, numActiveWrites_, proxygen::HTTP2PriorityQueue::numPendingEgress(), pendingWrites_, pendingWriteSizeDelta_, processReadData(), readsUnpaused(), proxygen::WheelTimerInstance::scheduleTimeout(), scheduleWrite(), proxygen::HTTPSession::WriteSegment::setCork(), proxygen::HTTPSession::WriteSegment::setEOR(), sock_, timeout_, txnEgressQueue_, uint32_t, uint64_t, proxygen::HTTPTransaction::updateContentionsCount(), proxygen::HTTPTransaction::updateSessionBytesSheduled(), updateWriteBufSize(), updateWriteCount(), fizz::detail::writeBuf(), proxygen::HTTPSession::WriteSegment::WriteSegment(), writesShutdown(), and writeTimeout_.
Referenced by isDraining(), and onWriteSuccess().
|
protected |
Schedule a write to occur at the end of this event loop.
Definition at line 2223 of file HTTPSession.cpp.
References proxygen::HTTP2PriorityQueue::empty(), folly::IOBufQueue::front(), folly::EventBase::LoopCallback::isLoopCallbackScheduled(), sock_, txnEgressQueue_, and writeBuf_.
Referenced by closeWhenIdle(), drainImpl(), isDraining(), notifyIngressBodyProcessed(), notifyPendingEgress(), onBody(), onCertificateRequest(), onConnectionSendWindowOpen(), proxygen::HTTPUpstreamSession::onNativeProtocolUpgrade(), onNativeProtocolUpgradeImpl(), onNewTransactionParseError(), onPingRequest(), onSessionParseError(), onSettings(), runLoopCallback(), sendAbort(), sendCertificateRequest(), sendChunkHeader(), sendChunkTerminator(), sendHeaders(), sendPing(), sendPriorityImpl(), sendSettings(), sendWindowUpdate(), shutdownTransport(), proxygen::HTTPUpstreamSession::startNow(), and startNow().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1783 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateRstStream(), proxygen::HTTPCodec::isReusable(), onEgressMessageFinished(), scheduleWrite(), proxygen::HTTPSessionBase::setCloseReason(), statusCode, proxygen::TRANSACTION_ABORT, and writeBuf_.
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1667 of file HTTPSession.cpp.
References bodyBytesPerWriteBuf_, byteEventTracker_, proxygen::HTTPSessionBase::codec_, commonEom(), proxygen::HTTPCodec::generateBody(), inLoopCallback_, folly::gen::move, proxygen::HTTPCodec::NoPadding, pendingWriteSizeDelta_, sessionByteOffset(), uint64_t, and writeBuf_.
Referenced by numIncomingStreams().
|
overridevirtual |
Send a CERTIFICATE_REQUEST frame. If the underlying protocol doesn't support secondary authentication, this is a no-op and 0 is returned.
Reimplemented from proxygen::HTTPSessionBase.
Definition at line 1829 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateCertificateRequest(), proxygen::HTTPCodec::getEgressSettings(), proxygen::HTTPCodec::getIngressSettings(), folly::gen::move, scheduleWrite(), secondAuthManager_, proxygen::SETTINGS_HTTP_CERT_AUTH, and writeBuf_.
Referenced by getSetupTransportInfo().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1696 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateChunkHeader(), scheduleWrite(), and writeBuf_.
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1705 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateChunkTerminator(), scheduleWrite(), and writeBuf_.
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1761 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, commonEom(), proxygen::HTTPCodec::generateEOM(), proxygen::HTTPCodec::generateTrailers(), proxygen::HTTPCodec::getProtocol(), proxygen::isHTTP2CodecProtocol(), and writeBuf_.
Referenced by numIncomingStreams().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1576 of file HTTPSession.cpp.
References folly::IOBufQueue::append(), byteEventTracker_, proxygen::HTTPSessionBase::codec_, commonEom(), drainImpl(), proxygen::HTTPCodec::generateExHeader(), proxygen::HTTPCodec::generateHeader(), proxygen::HTTPCodec::generatePushPromise(), getHTTP2PrioritiesEnabled(), getMessagePriority(), incrementOutgoingStreams(), isDownstream(), proxygen::HTTPCodec::isReusable(), isUpstream(), folly::IOBufQueue::move(), folly::gen::move, onHeadersSent(), scheduleWrite(), sessionByteOffset(), shouldShutdown(), folly::size(), started_, uint64_t, fizz::detail::writeBuf(), and writeBuf_.
Referenced by numIncomingStreams().
|
overridevirtual |
Causes a ping to be sent on the session. If the underlying protocol doesn't support pings, this will return 0. Otherwise, it will return the number of bytes written on the transport to send the ping.
Implements proxygen::HTTPSessionBase.
Definition at line 2505 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generatePingRequest(), scheduleWrite(), and writeBuf_.
Referenced by getSetupTransportInfo().
|
overridevirtual |
Sends a priority message on this session. If the underlying protocol doesn't support priority, this is a no-op. A new stream identifier will be selected and returned.
Implements proxygen::HTTPPriorityMapFactoryProvider.
Definition at line 2513 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::createStream(), and proxygen::HTTPCodec::supportsParallelRequests().
Referenced by getSetupTransportInfo(), and numIncomingStreams().
|
overridevirtual |
As above, but updates an existing priority node. Do not use for real nodes, prefer HTTPTransaction::changePriority.
Implements proxygen::HTTPSessionBase.
Definition at line 2523 of file HTTPSession.cpp.
References proxygen::HTTP2PriorityQueue::addOrUpdatePriorityNode(), sendPriorityImpl(), and txnEgressQueue_.
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1811 of file HTTPSession.cpp.
References sendPriorityImpl().
|
protected |
Sends a priority message on this session. If the underlying protocol doesn't support priority, this is a no-op. Returns the number of bytes written on the transport
Definition at line 2531 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::http2::PriorityUpdate::exclusive, proxygen::HTTPCodec::generatePriority(), std::tr1::make_tuple(), scheduleWrite(), proxygen::http2::PriorityUpdate::streamDependency, proxygen::http2::PriorityUpdate::weight, and writeBuf_.
Referenced by onHeadersSent(), and sendPriority().
|
overridevirtual |
Send a settings frame
Implements proxygen::HTTPSessionBase.
Definition at line 1495 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateSettings(), scheduleWrite(), folly::size(), and writeBuf_.
Referenced by getSetupTransportInfo(), and onNativeProtocolUpgradeImpl().
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1976 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::generateWindowUpdate(), scheduleWrite(), and writeBuf_.
Referenced by numIncomingStreams().
|
inlineprotected |
Tells us what would be the offset of the next byte to be enqueued within the whole session.
Definition at line 511 of file HTTPSession.h.
References bytesScheduled_, folly::IOBufQueue::chainLength(), checkForShutdown(), createTransaction(), proxygen::http2::DefaultPriority, findTransaction(), hasMoreWrites(), immediateShutdown(), onNewTransactionParseError(), onSessionParseError(), onWriteCompleted(), onWriteError(), onWriteSuccess(), pauseReads(), resumeReads(), uint64_t, and writeBuf_.
Referenced by commonEom(), sendBody(), and sendHeaders().
void proxygen::HTTPSession::setByteEventTracker | ( | std::shared_ptr< ByteEventTracker > | byteEventTracker | ) |
Definition at line 317 of file HTTPSession.cpp.
References byteEventTracker_, folly::gen::move, and proxygen::HTTPSessionBase::sessionStats_.
Referenced by getByteEventTracker(), and TEST().
void proxygen::HTTPSession::setEgressBytesLimit | ( | uint64_t | bytesLimit | ) |
Set the maximum number of bytes allowed to be egressed in the session before cutting it off
Definition at line 373 of file HTTPSession.cpp.
References egressBytesLimit_, and started_.
Referenced by getSetupTransportInfo().
|
overridevirtual |
Set outgoing settings for this session
Implements proxygen::HTTPSessionBase.
Definition at line 351 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::getEgressSettings(), proxygen::HTTPSettings::setSetting(), settings, and started_.
Referenced by getByteEventTracker(), and proxygen::HTTPSessionAcceptor::onNewConnection().
|
overridevirtual |
Set flow control properties on the session.
initialReceiveWindow | size of initial receive window for all ingress streams; set via the initial SETTINGS frame |
receiveStreamWindowSize | per-stream receive window for NEW streams; sent via a WINDOW_UPDATE frame |
receiveSessionWindowSize | per-session receive window; sent via a WINDOW_UPDATE frame |
Implements proxygen::HTTPSessionBase.
Definition at line 336 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::getEgressSettings(), proxygen::INITIAL_WINDOW_SIZE, initialReceiveWindow_, receiveSessionWindowSize_, receiveStreamWindowSize_, proxygen::HTTPSessionBase::setReadBufferLimit(), proxygen::HTTPSettings::setSetting(), settings, and started_.
Referenced by HTTPUpstreamTest< SPDY3CodecPair >::commonSetUp(), CurlService::CurlClient::connectSuccess(), getByteEventTracker(), and proxygen::HTTPSessionAcceptor::onNewConnection().
|
inlineoverridevirtual |
Implements proxygen::HTTPSessionBase.
Definition at line 204 of file HTTPSession.h.
References proxygen::HTTPSessionBase::codec_, and proxygen::HTTPCodec::setHeaderCodecStats().
|
inlineoverridevirtual |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 118 of file HTTPSession.h.
References proxygen::HTTPSessionBase::setHTTP2PrioritiesEnabled().
Referenced by proxygen::HTTPSessionAcceptor::onNewConnection().
|
overridevirtual |
Set the maximum number of transactions the remote can open at once.
Implements proxygen::HTTPSessionBase.
Definition at line 361 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, proxygen::HTTPCodec::getEgressSettings(), proxygen::MAX_CONCURRENT_STREAMS, maxConcurrentIncomingStreams_, proxygen::HTTPSettings::setSetting(), settings, started_, and proxygen::HTTPCodec::supportsParallelRequests().
Referenced by getSetupTransportInfo(), and proxygen::HTTPSessionAcceptor::onNewConnection().
|
protected |
Definition at line 722 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::egressLimitExceeded(), findTransaction(), and numActiveWrites_.
Referenced by newExTransaction(), newPushedTransaction(), proxygen::HTTPUpstreamSession::newTransaction(), onHeadersSent(), and proxygen::HTTPDownstreamSession::setupOnHeadersComplete().
void proxygen::HTTPSession::setSecondAuthManager | ( | std::unique_ptr< SecondaryAuthManager > | secondAuthManager | ) |
Attach a SecondaryAuthManager to this session to control secondary certificate authentication in HTTP/2.
Definition at line 1816 of file HTTPSession.cpp.
References folly::gen::move, and secondAuthManager_.
Referenced by connCloseByRemote().
|
overridevirtual |
Reimplemented from proxygen::HTTPSessionBase.
Definition at line 329 of file HTTPSession.cpp.
References byteEventTracker_, and proxygen::HTTPSessionBase::setSessionStats().
Referenced by proxygen::HTTPUpstreamSession::attachThreadLocals(), proxygen::HTTPUpstreamSession::detachThreadLocals(), getByteEventTracker(), and proxygen::HTTPSessionAcceptor::onNewConnection().
|
private |
Definition at line 243 of file HTTPSession.cpp.
References proxygen::FilterChain< T1, T2, FilterType, set_callback, TakeOwnership >::addFilters(), proxygen::FilterChain< T1, T2, FilterType, set_callback, TakeOwnership >::call(), proxygen::HTTPSessionBase::codec_, connFlowControl_, proxygen::HTTPCodec::generateConnectionPreface(), getCertAuthSettingVal(), proxygen::HTTPCodec::getEgressSettings(), isDownstream(), proxygen::MAX_CONCURRENT_STREAMS, maxConcurrentIncomingStreams_, maxConcurrentOutgoingStreamsRemote_, secondAuthManager_, proxygen::FilterChain< T1, T2, FilterType, set_callback, TakeOwnership >::setCallback(), proxygen::HTTPSettings::setSetting(), settings, proxygen::SETTINGS_HTTP_CERT_AUTH, proxygen::HTTPCodec::supportsParallelRequests(), proxygen::HTTPCodec::supportsSessionFlowControl(), uint32_t, and writeBuf_.
Referenced by getMaxConcurrentOutgoingStreamsRemote(), onNativeProtocolUpgradeImpl(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protectedpure virtual |
Called by onHeadersComplete(). This function allows downstream and upstream to do any setup (like preparing a handler) when headers are first received from the remote side on a given transaction.
Implemented in proxygen::HTTPUpstreamSession, and proxygen::HTTPDownstreamSession.
Referenced by connCloseByRemote(), and onHeadersComplete().
|
protected |
Returns true iff this session should shutdown at this time. Default behavior is to not shutdown.
Definition at line 2497 of file HTTPSession.cpp.
References allTransactionsStarted(), proxygen::HTTPSessionBase::codec_, draining_, proxygen::HTTPCodec::isReusable(), isUpstream(), and proxygen::HTTPCodec::supportsParallelRequests().
Referenced by detach(), invokeOnAllTransactions(), and sendHeaders().
|
protected |
Start closing the socket.
shutdownReads | Whether to close the read side of the socket. All transactions which are not ingress complete will receive an error. |
shutdownWrites | Whether to close the write side of the socket. All transactions which are not egress complete will receive an error. |
errorMsg | additional error information to pass to each transaction |
Definition at line 2283 of file HTTPSession.cpp.
References byteEventTracker_, checkForShutdown(), proxygen::HTTPCodec::closeOnEgressComplete(), proxygen::HTTPSessionBase::codec_, folly::SocketAddress::describe(), proxygen::HTTPException::EGRESS, folly::pushmi::operators::error(), flowControlTimeout_, proxygen::HTTPCodec::generateGoaway(), proxygen::HTTPSessionBase::getConnectionCloseReason(), proxygen::getErrorString(), proxygen::HTTPCodec::getLastIncomingStreamID(), getPeerAddress(), folly::gen::guard(), hasMoreWrites(), proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPException::INGRESS, proxygen::HTTPException::INGRESS_AND_EGRESS, invokeOnAllTransactions(), proxygen::IO_WRITE_ERROR, folly::HHWheelTimer::Callback::isScheduled(), proxygen::kErrorConnectionReset, proxygen::kErrorEOF, proxygen::kErrorSSL, proxygen::kErrorTimeout, proxygen::kErrorWrite, proxygen::NO_ERROR, proxygen::HTTPTransaction::onError(), proxygen::HTTPSessionBase::InfoCallback::onIngressEOF(), proxygen::HTTPCodec::onIngressEOF(), proxygen::HTTPSessionBase::InfoCallback::onIngressError(), reads_, readsShutdown(), resetAfterDrainingWrites_, resetSocketOnShutdown_, scheduleWrite(), proxygen::HTTPSessionBase::setCloseReason(), proxygen::HTTPCodec::setParserPaused(), proxygen::Exception::setProxygenError(), proxygen::SHUTDOWN, sock_, wangle::TransportInfo::sslError, proxygen::TIMEOUT, transactions_, proxygen::HTTPSessionBase::transportInfo_, proxygen::UNKNOWN, writeBuf_, writes_, writesDraining_, and writesShutdown().
Referenced by detach(), drain(), dropConnection(), flowControlTimeoutExpired(), isDraining(), onDeleteAckEvent(), onEgressMessageFinished(), onError(), onMessageComplete(), onSessionParseError(), onWriteCompleted(), onWriteSuccess(), readEOF(), readErr(), and proxygen::HTTPSession::ShutdownTransportCallback::runLoopCallback().
|
protected |
Immediately close the socket in both directions, discarding any queued writes that haven't yet been transferred to the kernel, and send a RST to the client. All transactions receive onWriteError.
errorCode | Error code sent with the onWriteError to transactions. |
errorMsg | Error string included in the final error msg. |
Definition at line 2391 of file HTTPSession.cpp.
References byteEventTracker_, folly::EventBase::LoopCallback::cancelLoopCallback(), folly::HHWheelTimer::Callback::cancelTimeout(), checkForShutdown(), destroy(), errorOnAllTransactions(), folly::gen::guard(), folly::EventBase::LoopCallback::isLoopCallbackScheduled(), folly::IOBufQueue::move(), numActiveWrites_, pendingWrites_, reads_, readsShutdown(), resetSocketOnShutdown_, proxygen::SHUTDOWN, sock_, writeBuf_, writes_, writesShutdown(), and writeTimeout_.
Referenced by dropConnection(), isDraining(), onWriteError(), and writeTimeoutExpired().
|
overridevirtual |
Start reading from the transport and send any introductory messages to the remote side. This function must be called once per session to begin reads.
Implements proxygen::HTTPSessionBase.
Reimplemented in proxygen::HTTPUpstreamSession.
Definition at line 297 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, connFlowControl_, draining_, proxygen::HTTPCodec::generateGoaway(), proxygen::HTTPCodec::generateSettings(), getGracefulGoawayAck(), proxygen::NO_ERROR, receiveSessionWindowSize_, resumeReads(), scheduleWrite(), proxygen::FlowControlFilter::setReceiveWindowSize(), started_, and writeBuf_.
Referenced by getSetupTransportInfo(), proxygen::HTTPDownstreamSession::startNow(), and proxygen::HTTPUpstreamSession::startNow().
|
inlineoverridevirtualnoexcept |
timeoutExpired() is invoked when the timeout has expired.
Implements wangle::ManagedConnection.
Definition at line 190 of file HTTPSession.h.
References closeWhenIdle(), describe(), dropConnection(), dumpConnectionState(), getCurrentTransportInfoWithoutUpdate(), isBusy(), notifyPendingShutdown(), readTimeoutExpired(), and uint8_t.
|
overrideprotectedvirtualnoexcept |
Implements proxygen::HTTPTransaction::Transport.
Definition at line 1537 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::codec_, getTransactionTimeoutHandler(), handler(), proxygen::HTTPSessionBase::infoCallback_, ingressError_, proxygen::kErrorTimeout, proxygen::HTTPSessionBase::InfoCallback::onIngressError(), and proxygen::HTTPCodec::supportsParallelRequests().
Referenced by numIncomingStreams().
|
protected |
Definition at line 2249 of file HTTPSession.cpp.
References proxygen::HTTPSessionBase::egressLimitExceeded(), inResume_, invokeOnAllTransactions(), proxygen::HTTPTransaction::pauseEgress(), pendingPause_, pendingWriteSizeDelta_, resumeTransactions(), and proxygen::HTTPSessionBase::updatePendingWriteSize().
Referenced by isDraining(), notifyEgressBodyBuffered(), onWriteSuccess(), and runLoopCallback().
|
protected |
Update the size of the unwritten egress data and invoke callbacks if the size has crossed the buffering limit.
Definition at line 2236 of file HTTPSession.cpp.
References numActiveWrites_, writes_, writesPaused(), and writesUnpaused().
Referenced by isDraining(), onWriteSuccess(), and runLoopCallback().
|
private |
Definition at line 211 of file HTTPSession.cpp.
References folly::IOBuf::computeChainDataLength(), fizz::extensions::test::ekm, getTransport(), folly::AsyncTransportWrapper::getUnderlyingTransport(), isUpstream(), fizz::test::label, uint16_t, and uint32_t.
Referenced by getMaxConcurrentOutgoingStreamsRemote(), and onSettings().
|
inlineprotected |
Definition at line 642 of file HTTPSession.h.
References writes_.
Referenced by proxygen::HTTPUpstreamSession::isDetachable(), and updateWriteCount().
|
inlineprotected |
Definition at line 646 of file HTTPSession.h.
References proxygen::SHUTDOWN, and writes_.
Referenced by checkForShutdown(), detach(), dropConnection(), getNextToSend(), immediateShutdown(), proxygen::HTTPUpstreamSession::isClosing(), runLoopCallback(), shutdownTransport(), and shutdownTransportWithReset().
|
inlineprotected |
|
protectednoexcept |
Definition at line 414 of file HTTPSession.cpp.
References g(), proxygen::kErrorWriteTimeout, pendingWrites_, proxygen::HTTPSessionBase::setCloseReason(), shutdownTransportWithReset(), and proxygen::TIMEOUT.
Referenced by getHTTPPriority(), and proxygen::HTTPSession::WriteTimeout::timeoutExpired().
|
private |
Number of body un-encoded bytes in the write buffer per write iteration.
Definition at line 959 of file HTTPSession.h.
Referenced by runLoopCallback(), and sendBody().
|
private |
Definition at line 966 of file HTTPSession.h.
Referenced by commonEom(), getByteEventTracker(), getNextToSend(), onLastByteEvent(), onMessageBegin(), onPingRequest(), onWriteSuccess(), sendBody(), sendHeaders(), setByteEventTracker(), setSessionStats(), shutdownTransport(), shutdownTransportWithReset(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Number of bytes scheduled so far.
Definition at line 948 of file HTTPSession.h.
Referenced by onPingRequest(), runLoopCallback(), and sessionByteOffset().
|
private |
Number of bytes written so far.
Definition at line 943 of file HTTPSession.h.
Referenced by getNextToSend(), and onWriteSuccess().
|
private |
Connection level flow control for SPDY >= 3.1 and HTTP/2
Definition at line 913 of file HTTPSession.h.
Referenced by getNextToSend(), isConnWindowFull(), notifyIngressBodyProcessed(), onBody(), onNativeProtocolUpgradeImpl(), runLoopCallback(), setupCodec(), and startNow().
|
protected |
Indicates if the session is waiting for existing transactions to close. Once all transactions close, the session will be deleted.
Definition at line 711 of file HTTPSession.h.
Referenced by drain(), proxygen::HTTPUpstreamSession::isClosing(), isDraining(), newExTransaction(), newPushedTransaction(), proxygen::HTTPUpstreamSession::newTransaction(), shouldShutdown(), startNow(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 1033 of file HTTPSession.h.
Referenced by readTimeoutExpired(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Max number of bytes to egress per session
Definition at line 971 of file HTTPSession.h.
Referenced by onWriteSuccess(), and setEgressBytesLimit().
|
private |
Definition at line 1020 of file HTTPSession.h.
Referenced by onConnectionSendWindowClosed(), onConnectionSendWindowOpen(), shutdownTransport(), proxygen::HTTPSession::WriteSegment::writeErr(), and ~HTTPSession().
|
private |
The number of concurrent transactions initiated by this sessions's peer
Definition at line 938 of file HTTPSession.h.
Referenced by createTransaction(), decrementTransactionCount(), getNumIncomingStreams(), getPipelineStreamCount(), and numIncomingStreams().
|
protected |
Definition at line 717 of file HTTPSession.h.
Referenced by proxygen::HTTPUpstreamSession::isReusable(), onError(), processReadData(), transactionTimeout(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Indicates whether an upgrade request has been received from the codec.
Definition at line 1047 of file HTTPSession.h.
Referenced by onMessageComplete(), proxygen::HTTPSession::ShutdownTransportCallback::runLoopCallback(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 974 of file HTTPSession.h.
Referenced by createTransaction(), onNativeProtocolUpgradeImpl(), setFlowControl(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 1050 of file HTTPSession.h.
Referenced by onWriteSuccess(), runLoopCallback(), sendBody(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 1051 of file HTTPSession.h.
Referenced by resumeTransactions(), updateWriteBufSize(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
Count of transactions awaiting input
Definition at line 695 of file HTTPSession.h.
Referenced by createTransaction(), detach(), proxygen::HTTPUpstreamSession::isReusable(), onMessageBegin(), pauseIngress(), readTimeoutExpired(), and resumeIngress().
|
private |
The maximum number of concurrent transactions that this session's peer may create.
Definition at line 928 of file HTTPSession.h.
Referenced by onNativeProtocolUpgradeImpl(), setMaxConcurrentIncomingStreams(), setupCodec(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
The received setting for the maximum number of concurrent transactions that this session may create. We may assume the remote allows unlimited transactions until we get a SETTINGS frame, but to be reasonable, assume the remote doesn't allow more than 100K concurrent transactions on one connection.
Definition at line 922 of file HTTPSession.h.
Referenced by getMaxConcurrentOutgoingStreamsRemote(), newExTransaction(), newPushedTransaction(), onNativeProtocolUpgradeImpl(), onSetMaxInitiatedStreams(), and setupCodec().
|
private |
Container to hold the results of HTTP2PriorityQueue::nextEgress
Definition at line 964 of file HTTPSession.h.
Referenced by getNextToSend(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
Number of writes submitted to the transport for which we haven't yet received completion or failure callbacks.
Definition at line 705 of file HTTPSession.h.
Referenced by getNextToSend(), hasMoreWrites(), proxygen::HTTPUpstreamSession::isReusable(), onWriteCompleted(), onWriteSuccess(), runLoopCallback(), setNewTransactionPauseState(), shutdownTransportWithReset(), and updateWriteCount().
|
private |
The number concurrent transactions initiated by this session
Definition at line 933 of file HTTPSession.h.
Referenced by decrementTransactionCount(), getNumOutgoingStreams(), incrementOutgoingStreams(), newExTransaction(), newPushedTransaction(), and numOutgoingStreams().
|
private |
Definition at line 1052 of file HTTPSession.h.
Referenced by resumeTransactions(), updateWriteBufSize(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 908 of file HTTPSession.h.
Referenced by hasMoreWrites(), onWriteCompleted(), onWriteSuccess(), runLoopCallback(), shutdownTransportWithReset(), and writeTimeoutExpired().
|
private |
The net change this event loop in the amount of buffered bytes for all this session's txns and socket write buffer.
Definition at line 954 of file HTTPSession.h.
Referenced by notifyEgressBodyBuffered(), runLoopCallback(), sendBody(), and updateWriteBufSize().
|
protected |
Chain of ingress IOBufs
Definition at line 687 of file HTTPSession.h.
Referenced by getReadBuffer(), processReadData(), readBufferAvailable(), readDataAvailable(), and readEOF().
|
private |
Definition at line 1041 of file HTTPSession.h.
Referenced by checkForShutdown(), pauseReadsImpl(), readsPaused(), readsShutdown(), readsUnpaused(), resumeReadsImpl(), shutdownTransport(), shutdownTransportWithReset(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 976 of file HTTPSession.h.
Referenced by onNativeProtocolUpgradeImpl(), setFlowControl(), startNow(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 975 of file HTTPSession.h.
Referenced by createTransaction(), onNativeProtocolUpgradeImpl(), setFlowControl(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
Definition at line 716 of file HTTPSession.h.
Referenced by proxygen::HTTPUpstreamSession::isClosing(), onEgressMessageFinished(), shutdownTransport(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 1048 of file HTTPSession.h.
Referenced by checkForShutdown(), shutdownTransport(), shutdownTransportWithReset(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
private |
Definition at line 1055 of file HTTPSession.h.
Referenced by getSecondAuthManager(), onCertificate(), onCertificateRequest(), sendCertificateRequest(), setSecondAuthManager(), and setupCodec().
|
private |
Definition at line 998 of file HTTPSession.h.
Referenced by cancelLoopCallbacks(), immediateShutdown(), onEgressMessageFinished(), and rescheduleLoopCallbacks().
|
protected |
Definition at line 697 of file HTTPSession.h.
Referenced by proxygen::HTTPUpstreamSession::attachThreadLocals(), checkForShutdown(), createTransaction(), proxygen::HTTPUpstreamSession::detachThreadLocals(), dropConnection(), getCurrentTransportInfoWithoutUpdate(), getEventBase(), getSecurityProtocol(), getTransport(), getUnderlyingTransport(), proxygen::HTTPUpstreamSession::HTTPUpstreamSession(), proxygen::HTTPUpstreamSession::isClosing(), proxygen::HTTPUpstreamSession::isDetachable(), proxygen::HTTPUpstreamSession::isReplaySafe(), proxygen::HTTPUpstreamSession::isReusable(), proxygen::HTTPUpstreamSession::maybeAttachSSLContext(), proxygen::HTTPUpstreamSession::maybeDetachSSLContext(), notifyEgressBodyBuffered(), onEgressMessageFinished(), onLastByteEvent(), onNativeProtocolUpgradeImpl(), onReplaySafe(), pauseReadsImpl(), rescheduleLoopCallbacks(), resumeReadsImpl(), runLoopCallback(), scheduleWrite(), shutdownTransport(), shutdownTransportWithReset(), proxygen::HTTPSession::WriteSegment::writeErr(), and ~HTTPSession().
|
protected |
Definition at line 713 of file HTTPSession.h.
Referenced by drainImpl(), newExTransaction(), proxygen::HTTPUpstreamSession::newTransaction(), sendHeaders(), setEgressBytesLimit(), setEgressSettings(), setFlowControl(), setMaxConcurrentIncomingStreams(), startNow(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
Definition at line 699 of file HTTPSession.h.
Referenced by proxygen::HTTPUpstreamSession::attachThreadLocals(), createTransaction(), onConnectionSendWindowClosed(), onWriteSuccess(), readTimeoutExpired(), runLoopCallback(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
Definition at line 692 of file HTTPSession.h.
Referenced by proxygen::HTTPDownstreamSession::allTransactionsStarted(), proxygen::HTTPUpstreamSession::allTransactionsStarted(), checkForShutdown(), createTransaction(), detach(), proxygen::HTTPUpstreamSession::detachThreadLocals(), proxygen::HTTPUpstreamSession::detachTransactions(), drain(), dropConnection(), errorOnAllTransactions(), findTransaction(), hasActiveTransactions(), immediateShutdown(), invokeOnAllTransactions(), isBusy(), proxygen::HTTPUpstreamSession::isDetachable(), maybeResumePausedPipelinedTransaction(), onDeleteAckEvent(), onEgressMessageFinished(), onError(), onGoaway(), onMessageBegin(), onWriteSuccess(), readEOF(), readErr(), readTimeoutExpired(), resumeTransactions(), shutdownTransport(), and ~HTTPSession().
|
protected |
Priority tree of transactions
Definition at line 690 of file HTTPSession.h.
Referenced by proxygen::HTTPUpstreamSession::attachThreadLocals(), createTransaction(), proxygen::HTTPUpstreamSession::detachThreadLocals(), getNextToSend(), hasMoreWrites(), onConnectionSendWindowClosed(), proxygen::HTTPDownstreamSession::onNativeProtocolUpgrade(), proxygen::HTTPUpstreamSession::onNativeProtocolUpgrade(), onPriority(), resumeTransactions(), runLoopCallback(), scheduleWrite(), sendPriority(), proxygen::HTTPDownstreamSession::startNow(), proxygen::HTTPUpstreamSession::startNow(), proxygen::HTTPSession::WriteSegment::writeErr(), and ~HTTPSession().
|
private |
Definition at line 846 of file HTTPSession.h.
Referenced by addWaitingForReplaySafety(), needToBlockForReplaySafety(), onReplaySafe(), and removeWaitingForReplaySafety().
|
protected |
Queue of egress IOBufs
Definition at line 684 of file HTTPSession.h.
Referenced by closeWhenIdle(), drainImpl(), getNextToSend(), hasMoreWrites(), notifyIngressBodyProcessed(), onBody(), onCertificateRequest(), proxygen::HTTPDownstreamSession::onNativeProtocolUpgrade(), proxygen::HTTPUpstreamSession::onNativeProtocolUpgrade(), onNativeProtocolUpgradeImpl(), onNewTransactionParseError(), onPingRequest(), onSessionParseError(), onSettings(), scheduleWrite(), sendAbort(), sendBody(), sendCertificateRequest(), sendChunkHeader(), sendChunkTerminator(), sendEOM(), sendHeaders(), sendPing(), sendPriorityImpl(), sendSettings(), sendWindowUpdate(), sessionByteOffset(), setupCodec(), shutdownTransport(), shutdownTransportWithReset(), proxygen::HTTPDownstreamSession::startNow(), proxygen::HTTPUpstreamSession::startNow(), and startNow().
|
private |
Definition at line 1042 of file HTTPSession.h.
Referenced by shutdownTransport(), shutdownTransportWithReset(), updateWriteCount(), proxygen::HTTPSession::WriteSegment::writeErr(), writesPaused(), writesShutdown(), and writesUnpaused().
|
protected |
Definition at line 715 of file HTTPSession.h.
Referenced by detach(), proxygen::HTTPUpstreamSession::isClosing(), onWriteCompleted(), shutdownTransport(), and proxygen::HTTPSession::WriteSegment::writeErr().
|
protected |
Definition at line 681 of file HTTPSession.h.
Referenced by proxygen::HTTPUpstreamSession::isReusable(), onWriteSuccess(), runLoopCallback(), shutdownTransportWithReset(), proxygen::HTTPSession::WriteSegment::writeErr(), and ~HTTPSession().