Refactor: move network COMs out of Network and into Peer in prep for tightening up multicast lookup and other things.
This commit is contained in:
parent
11ff96ba1d
commit
a3db7d0728
11 changed files with 289 additions and 215 deletions
|
@ -168,6 +168,16 @@ public:
|
|||
return _network(nwid);
|
||||
}
|
||||
|
||||
inline bool belongsToNetwork(uint64_t nwid) const
|
||||
{
|
||||
Mutex::Lock _l(_networks_m);
|
||||
for(std::vector< std::pair< uint64_t, SharedPtr<Network> > >::const_iterator i=_networks.begin();i!=_networks.end();++i) {
|
||||
if (i->first == nwid)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
inline std::vector< SharedPtr<Network> > allNetworks() const
|
||||
{
|
||||
std::vector< SharedPtr<Network> > nw;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue