Add peer count to server_info.

This commit is contained in:
JoelKatz
2012-10-28 19:17:33 -07:00
parent bede5379a5
commit c9a2482c95
3 changed files with 9 additions and 0 deletions

View File

@@ -330,6 +330,13 @@ Json::Value ConnectionPool::getPeersJson()
return ret;
}
int ConnectionPool::getPeerCount()
{
boost::mutex::scoped_lock sl(mPeerLock);
return mConnectedMap.size();
}
std::vector<Peer::pointer> ConnectionPool::getPeerVector()
{
std::vector<Peer::pointer> ret;