2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
10 * DEBUG: section 33 Client Request Pipeline
13 #include "client_side.h"
18 Pipeline::add(const ClientSocketContextPointer
&c
)
20 requests
.push_back(c
);
22 debugs(33, 3, "Pipeline " << (void*)this << " add request " << nrequests
<< ' ' << c
);
25 ClientSocketContextPointer
26 Pipeline::front() const
28 if (requests
.empty()) {
29 debugs(33, 3, "Pipeline " << (void*)this << " empty");
30 return ClientSocketContextPointer();
33 debugs(33, 3, "Pipeline " << (void*)this << " front " << requests
.front());
34 return requests
.front();
38 Pipeline::terminateAll(int xerrno
)
40 while (!requests
.empty()) {
41 ClientSocketContextPointer context
= requests
.front();
42 debugs(33, 3, "Pipeline " << (void*)this << " notify(" << xerrno
<< ") " << context
);
43 context
->noteIoError(xerrno
);
44 context
->connIsFinished(); // cleanup and self-deregister
45 assert(context
!= requests
.front());
55 debugs(33, 3, "Pipeline " << (void*)this << " drop " << requests
.front());