#include <Pipeline.h>

Collaboration diagram for Pipeline:

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 terminateAll (const int xerrno)
 tell everybody about the err, and abort all waiting requests 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
Pipelineoperator= (const Pipeline &)=delete

Private Attributes

std::list< Http::StreamPointerrequests
 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]

Pipeline::Pipeline ( const Pipeline )

◆ Pipeline() [2/2]

Pipeline::Pipeline ( )

Definition at line 40 of file Pipeline.h.

◆ ~Pipeline()

Pipeline::~Pipeline ( )

Member Function Documentation

◆ add()

void Pipeline::add ( const Http::StreamPointer c)

Definition at line 20 of file Pipeline.cc.

References debugs, nrequests, and requests.

◆ back()

Http::StreamPointer Pipeline::back ( ) const

Definition at line 40 of file Pipeline.cc.

References debugs, and requests.

Referenced by ConnStateData::checkLogging().

◆ count()

size_t Pipeline::count ( ) const

Definition at line 53 of file Pipeline.h.

References requests.

Referenced by ConnStateData::concurrentRequestQueueFilled().

◆ empty()

◆ front()

◆ operator=()

Pipeline& Pipeline::operator= ( const Pipeline )

◆ popMe()

void Pipeline::popMe ( const Http::StreamPointer which)

Definition at line 64 of file Pipeline.cc.

References assert, debugs, and requests.

◆ terminateAll()

void Pipeline::terminateAll ( const int  xerrno)

Member Data Documentation

◆ nrequests

uint32_t Pipeline::nrequests

Number of requests seen in this pipeline (so far). Includes incomplete transactions.

Definition at line 66 of file Pipeline.h.

Referenced by add(), ConnStateData::checkLogging(), and ConnStateData::shouldPreserveClientData().

◆ requests

std::list<Http::StreamPointer> Pipeline::requests

Definition at line 70 of file Pipeline.h.

Referenced by add(), back(), count(), empty(), front(), popMe(), and terminateAll().

The documentation for this class was generated from the following files:






Web Site Translations