Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
d1bf5d0
)
THRIFT-1561 expose #active connections
author
Roger Meier
<roger@apache.org>
Wed, 11 Apr 2012 21:43:25 +0000
(21:43 +0000)
committer
Roger Meier
<roger@apache.org>
Wed, 11 Apr 2012 21:43:25 +0000
(21:43 +0000)
Patch: Dave Watson
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@
1325024
13f79535
-47bb-0310-9956-
ffa450edef68
lib/cpp/src/server/TNonblockingServer.h
patch
|
blob
|
history
diff --git
a/lib/cpp/src/server/TNonblockingServer.h
b/lib/cpp/src/server/TNonblockingServer.h
index
5f5ea11
..
6b854b5
100644
(file)
--- a/
lib/cpp/src/server/TNonblockingServer.h
+++ b/
lib/cpp/src/server/TNonblockingServer.h
@@
-454,6
+454,15
@@
class TNonblockingServer : public TServer {
return numTConnections_;
}
+ /**
+ * Return the count of sockets currently connected to.
+ *
+ * @return count of connected sockets.
+ */
+ size_t getNumActiveConnections() const {
+ return getNumConnections() - getNumIdleConnections();
+ }
+
/**
* Return the count of connection objects allocated but not in use.
*