#include <Pipeline.h>
Public Member Functions | |
Pipeline () | |
~Pipeline ()=default | |
void | add (const Http::StreamPointer &) |
register a new request context to the pipeline More... | |
Http::StreamPointer | front () const |
get the first request context in the pipeline More... | |
Http::StreamPointer | back () const |
get the last request context in the pipeline More... | |
size_t | count () const |
how many requests are currently pipelined More... | |
bool | empty () const |
whether there are none or any requests currently pipelined More... | |
void | popMe (const Http::StreamPointer &) |
deregister the front request from the pipeline More... | |
Public Attributes | |
uint32_t | nrequests |
Private Member Functions | |
Pipeline (const Pipeline &)=delete | |
Pipeline & | operator= (const Pipeline &)=delete |
Private Attributes | |
std::list< Http::StreamPointer > | requests |
requests parsed from the connection but not yet completed. More... | |
Detailed Description
A queue of transactions awaiting completion.
Transactions in the queue may be fully processed, but not yet delivered, or only partially processed.
- HTTP/1 pipelined requests can be processed out of order but responses MUST be written to the client in-order. The front() context is for the response writing transaction. The back context may still be reading a request payload/body. Other contexts are in deferred I/O state, but may be accumulating payload/body data to be written later.
- HTTP/2 multiplexed streams can be processed and delivered in any order.
For consistency we treat the pipeline as a FIFO queue in both cases.
Definition at line 34 of file Pipeline.h.
Constructor & Destructor Documentation
◆ Pipeline() [1/2]
|
privatedelete |
◆ Pipeline() [2/2]
|
inline |
Definition at line 40 of file Pipeline.h.
◆ ~Pipeline()
|
default |
Member Function Documentation
◆ add()
void Pipeline::add | ( | const Http::StreamPointer & | c | ) |
Definition at line 20 of file Pipeline.cc.
References debugs, nrequests, and requests.
Referenced by ConnStateData::add().
◆ back()
Http::StreamPointer Pipeline::back | ( | ) | const |
Definition at line 40 of file Pipeline.cc.
References debugs, and requests.
Referenced by ConnStateData::terminateAll().
◆ count()
|
inline |
Definition at line 53 of file Pipeline.h.
References requests.
Referenced by ConnStateData::add(), ConnStateData::concurrentRequestQueueFilled(), and ConnStateData::terminateAll().
◆ empty()
|
inline |
Definition at line 56 of file Pipeline.h.
References requests.
Referenced by ConnStateData::afterClientRead(), ConnStateData::afterClientWrite(), ConnStateData::checkLogging(), ConnStateData::clientPinnedConnectionRead(), ConnStateData::httpsPeeked(), ConnStateData::notePinnedConnectionBecameIdle(), ConnStateData::parseRequests(), ConnStateData::sendControlMsg(), ConnStateData::shouldCloseOnEof(), ConnStateData::splice(), ConnStateData::startShutdown(), and ConnStateData::terminateAll().
◆ front()
Http::StreamPointer Pipeline::front | ( | ) | const |
Definition at line 28 of file Pipeline.cc.
References debugs, and requests.
Referenced by ConnStateData::abortChunkedRequestBody(), ConnStateData::afterClientWrite(), clientSocketRecipient(), Server::clientWriteDone(), ConnStateData::doneWithControlMsg(), ConnStateData::fillChecklist(), ConnStateData::finishDechunkingRequest(), ConnStateData::httpsPeeked(), httpsSslBumpStep2AccessCheckDone(), ConnStateData::kick(), ConnStateData::parseTlsHandshake(), ConnStateData::postHttpsAccept(), ConnStateData::sendControlMsg(), ConnStateData::splice(), ConnStateData::startPeekAndSplice(), ConnStateData::terminateAll(), ConnStateData::tunnelOnError(), and ConnStateData::updateError().
◆ operator=()
◆ popMe()
void Pipeline::popMe | ( | const Http::StreamPointer & | which | ) |
Definition at line 52 of file Pipeline.cc.
Member Data Documentation
◆ nrequests
uint32_t Pipeline::nrequests |
Number of requests seen in this pipeline (so far). Includes incomplete transactions.
Definition at line 63 of file Pipeline.h.
Referenced by add(), ConnStateData::add(), ConnStateData::checkLogging(), ConnStateData::shouldPreserveClientData(), and ConnStateData::terminateAll().
◆ requests
|
private |
The documentation for this class was generated from the following files:
- src/Pipeline.h
- src/Pipeline.cc