THRIFT-1561 expose #active connections
Patch: Dave Watson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325024 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/server/TNonblockingServer.h
index 5f5ea11..6b854b5 100644
--- a/lib/cpp/src/server/TNonblockingServer.h
+++ b/lib/cpp/src/server/TNonblockingServer.h
@@ -455,6 +455,15 @@
   }
 
   /**
+   * 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.
    *
    * @return count of idle connection objects.