Pipeline.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_SRC_PIPELINE_H
10#define SQUID_SRC_PIPELINE_H
11
12#include "base/RefCount.h"
13#include "http/Stream.h"
14
15#include <list>
16
35{
36 Pipeline(const Pipeline &) = delete;
37 Pipeline & operator =(const Pipeline &) = delete;
38
39public:
41 ~Pipeline() = default;
42
44 void add(const Http::StreamPointer &);
45
48
51
53 size_t count() const {return requests.size();}
54
56 bool empty() const {return requests.empty();}
57
59 void popMe(const Http::StreamPointer &);
60
63 uint32_t nrequests;
64
65private:
67 std::list<Http::StreamPointer> requests;
68};
69
70#endif /* SQUID_SRC_PIPELINE_H */
71
bool empty() const
whether there are none or any requests currently pipelined
Definition: Pipeline.h:56
size_t count() const
how many requests are currently pipelined
Definition: Pipeline.h:53
uint32_t nrequests
Definition: Pipeline.h:63
Http::StreamPointer front() const
get the first request context in the pipeline
Definition: Pipeline.cc:28
Pipeline & operator=(const Pipeline &)=delete
void add(const Http::StreamPointer &)
register a new request context to the pipeline
Definition: Pipeline.cc:20
Pipeline()
Definition: Pipeline.h:40
void popMe(const Http::StreamPointer &)
deregister the front request from the pipeline
Definition: Pipeline.cc:52
Http::StreamPointer back() const
get the last request context in the pipeline
Definition: Pipeline.cc:40
~Pipeline()=default
std::list< Http::StreamPointer > requests
requests parsed from the connection but not yet completed.
Definition: Pipeline.h:67
Pipeline(const Pipeline &)=delete

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors