/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#define SQUID_SRC_PIPELINE_H
#include "base/RefCount.h"
+#include "http/forward.h"
#include <list>
-class ClientSocketContext;
-typedef RefCount<ClientSocketContext> ClientSocketContextPointer;
-
/**
* A queue of transactions awaiting completion.
*
~Pipeline() = default;
/// register a new request context to the pipeline
- void add(const ClientSocketContextPointer &);
+ void add(const Http::StreamPointer &);
/// get the first request context in the pipeline
- ClientSocketContextPointer front() const;
+ Http::StreamPointer front() const;
+
+ /// get the last request context in the pipeline
+ Http::StreamPointer back() const;
/// how many requests are currently pipelined
size_t count() const {return requests.size();}
void terminateAll(const int xerrno);
/// deregister the front request from the pipeline
- void popMe(const ClientSocketContextPointer &);
+ void popMe(const Http::StreamPointer &);
/// Number of requests seen in this pipeline (so far).
/// Includes incomplete transactions.
private:
/// requests parsed from the connection but not yet completed.
- std::list<ClientSocketContextPointer> requests;
+ std::list<Http::StreamPointer> requests;
};
#endif /* SQUID_SRC_PIPELINE_H */