mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
dhtrunner: add getNodeInfo()
Allow to retrieve all dht stats in a single API call using the new method getNodeInfo() and the JSON-serializable new structure NodeInfo.
This commit is contained in:
1 parent
4c89ce9d3f
commit
aa202b2cd8
11 files changed
+152
-91
No files matched your search
+4
-4
@@ -22,9 +22,9 @@
|
||||
#include "default_types.h"
|
||||
#include "securedht.h" // print certificate ID
|
||||
|
||||
#if OPENDHT_PROXY_SERVER || OPENDHT_PROXY_CLIENT
|
||||
#ifdef OPENDHT_JSONCPP
|
||||
#include "base64.h"
|
||||
#endif //OPENDHT_PROXY_SERVER
|
||||
#endif
|
||||
|
||||
|
||||
namespace dht {
|
||||
@@ -172,7 +172,7 @@ Value::msgpack_unpack_body(const msgpack::object& o)
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENDHT_PROXY_SERVER || OPENDHT_PROXY_CLIENT
|
||||
#ifdef OPENDHT_JSONCPP
|
||||
Value::Value(Json::Value& json)
|
||||
{
|
||||
id = Value::Id(unpackId(json, "id"));
|
||||
@@ -248,7 +248,7 @@ unpackId(const Json::Value& json, const std::string& key) {
|
||||
} catch (...) {}
|
||||
return ret;
|
||||
}
|
||||
#endif //OPENDHT_PROXY_SERVER
|
||||
#endif
|
||||
|
||||
bool
|
||||
FieldValue::operator==(const FieldValue& vfd) const
|
||||
|
||||
Reference in new issue
Block a user