#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 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 )
privatedelete

◆ Pipeline() [2/2]

Pipeline::Pipeline ( )
inline

Definition at line 40 of file Pipeline.h.

◆ ~Pipeline()

Pipeline::~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()

size_t Pipeline::count ( ) const
inline

◆ empty()

◆ front()

◆ operator=()

Pipeline & Pipeline::operator= ( const Pipeline )
privatedelete

◆ popMe()

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

Definition at line 52 of file Pipeline.cc.

References assert, debugs, and requests.

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

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

Definition at line 67 of file Pipeline.h.

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


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors