More toward GitHub issue #56

This commit is contained in:
Adam Ierymenko 2014-04-10 16:30:15 -07:00
parent c9294c1a78
commit aee742e767
12 changed files with 113 additions and 27 deletions

View file

@ -175,6 +175,20 @@ public:
return _paths;
}
/**
* @param addr IP:port
* @return True if we have a UDP path to this address
*/
inline bool haveUdpPath(const InetAddress &addr) const
{
Mutex::Lock _l(_lock);
for(std::vector<Path>::const_iterator p(_paths.begin());p!=_paths.end();++p) {
if ((p->type() == Path::PATH_TYPE_UDP)&&(p->address() == addr))
return true;
}
return false;
}
/**
* @return Last successfully sent firewall opener for any path
*/