More work in progress in new multicast propagation...
This commit is contained in:
parent
f3128a18fe
commit
24bad9f3d1
9 changed files with 226 additions and 162 deletions
|
@ -76,19 +76,21 @@ void Multicaster::bringCloser(uint64_t nwid,const Address &a)
|
|||
}
|
||||
}
|
||||
|
||||
void Multicaster::got(uint64_t nwid,const Address &peer,uint64_t mcGuid,uint64_t now)
|
||||
void Multicaster::got(uint64_t nwid,const Address &peer,uint64_t mcGuid)
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
_NetInfo &n = _nets[nwid];
|
||||
std::pair< uint64_t,std::set<Address> > &g = n.got[mcGuid];
|
||||
g.first = now;
|
||||
g.first = Utils::now();
|
||||
g.second.insert(peer);
|
||||
}
|
||||
|
||||
void Multicaster::clean(uint64_t now)
|
||||
void Multicaster::clean()
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
|
||||
uint64_t now = Utils::now();
|
||||
|
||||
for(std::map< uint64_t,_NetInfo >::iterator n(_nets.begin());n!=_nets.end();) {
|
||||
for(std::map< uint64_t,std::pair< uint64_t,std::set<Address> > >::iterator g(n->second.got.begin());g!=n->second.got.end();) {
|
||||
if ((now - g->second.first) > ZT_MULTICAST_MAGNET_STATE_EXPIRE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue