From: Remi Gacogne Date: Wed, 3 Apr 2019 15:30:21 +0000 (+0200) Subject: mplexer: Add an accessor to get the number of watched FDs X-Git-Tag: dnsdist-1.4.0-alpha1~25^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=696e32f526470f4a91b7a358677d8cfa579fc1c6;p=thirdparty%2Fpdns.git mplexer: Add an accessor to get the number of watched FDs --- diff --git a/pdns/mplexer.hh b/pdns/mplexer.hh index a008ec7cf7..927651c332 100644 --- a/pdns/mplexer.hh +++ b/pdns/mplexer.hh @@ -162,6 +162,11 @@ public: virtual std::string getName() const = 0; + size_t getWatchedFDCount(bool writeFDs) const + { + return writeFDs ? d_writeCallbacks.size() : d_readCallbacks.size(); + } + protected: struct FDBasedTag {}; struct TTDOrderedTag {};