opendht-2.1.4/src/dht_proxy_client.cpp
/**
 * Get data currently being put at the given hash.
 */
Get data currently being put at the given hash.
Get data currently being put at the given hash .
std::vector<Sp<Value>>
DhtProxyClient::getPut(const InfoHash& key) const {
    std::vector<Sp<Value>> ret;
    auto search = searches_.find(key);
    if (search != searches_.end()) {
        ret.reserve(search->second.puts.size());
        for (const auto& put : search->second.puts)
            ret.emplace_back(put.second.value);
    }
    return ret;
}
std :: vector < Sp < Value > > DhtProxyClient :: getPut ( const InfoHash & key ) const { std :: vector < Sp < Value > > ret ; auto search = searches_ . find ( key ) ; if ( search != searches_ . end ( ) ) { ret . reserve ( search -> second . puts . size ( ) ) ; for ( const auto & put : search -> second . puts ) ret . emplace_back ( put . second . value ) ; } return ret ; }
Get data currently being put at the given hash.
Get data currently being put at the given hash .