From: Alex Rousskov Date: Mon, 6 Sep 2010 00:05:09 +0000 (-0600) Subject: Added producedSize() method to report total data size put by the producer. X-Git-Tag: take1~292 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc0017a9d6f0d7dddbcc5760ae0f3390dfd29dfd;p=thirdparty%2Fsquid.git Added producedSize() method to report total data size put by the producer. It is often very convenient to know this size, but one must be careful not to use its value for body size, available body size, or exhaustion-calculating expressions. No runtime changes expected. --- diff --git a/src/BodyPipe.h b/src/BodyPipe.h index c9e7c93c97..cd7dea4f2b 100644 --- a/src/BodyPipe.h +++ b/src/BodyPipe.h @@ -99,6 +99,7 @@ public: bool bodySizeKnown() const { return theBodySize >= 0; } uint64_t bodySize() const; uint64_t consumedSize() const { return theGetSize; } + uint64_t producedSize() const { return thePutSize; } bool productionEnded() const { return !theProducer; } // called by producers