| 3844 | } |
| 3845 | |
| 3846 | size_t CConnman::GetNodeCount(ConnectionDirection flags) const |
| 3847 | { |
| 3848 | LOCK(m_nodes_mutex); |
| 3849 | if (flags == ConnectionDirection::Both) // Shortcut if we want total |
| 3850 | return m_nodes.size(); |
| 3851 | |
| 3852 | int nNum = 0; |
| 3853 | for (const auto& pnode : m_nodes) { |
| 3854 | if (flags & (pnode->IsInboundConn() ? ConnectionDirection::In : ConnectionDirection::Out)) { |
| 3855 | nNum++; |
| 3856 | } |
| 3857 | } |
| 3858 | |
| 3859 | return nNum; |
| 3860 | } |
| 3861 | |
| 3862 | |
| 3863 | std::map<CNetAddr, LocalServiceInfo> CConnman::getNetLocalAddresses() const |
no test coverage detected