mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
proxy client: implement getLocal(), getLocalById()
This commit is contained in:
1 parent
2f4acd26d6
commit
647de16f1c
3 files changed
+57
-7
No files matched your search
@@ -84,6 +84,22 @@ DhtProxyClient::~DhtProxyClient()
|
||||
cancelAllListeners();
|
||||
}
|
||||
|
||||
std::vector<Sp<Value>>
|
||||
DhtProxyClient::getLocal(const InfoHash& k, Value::Filter filter) const {
|
||||
auto s = listeners_.find(k);
|
||||
if (s == listeners_.end())
|
||||
return {};
|
||||
return s->second.ops.get(filter);
|
||||
}
|
||||
|
||||
Sp<Value>
|
||||
DhtProxyClient::getLocalById(const InfoHash& k, Value::Id id) const {
|
||||
auto s = listeners_.find(k);
|
||||
if (s == listeners_.end())
|
||||
return {};
|
||||
return s->second.ops.get(id);
|
||||
}
|
||||
|
||||
void
|
||||
DhtProxyClient::cancelAllOperations()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user