mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
nodejs: add an interactive dhtnode example
This commit is contained in:
1 parent
9ec7a58ee3
commit
3a3c421ef9
8 files changed
+323
-100
No files matched your search
+6
-2
@@ -303,8 +303,12 @@ struct RunnerState
|
||||
Napi::Object status() const
|
||||
{
|
||||
auto result = Napi::Object::New(env);
|
||||
result.Set("ipv4", Napi::String::New(env, std::string(dht::statusToStr(closing ? dht::NodeStatus::Disconnected : status4))));
|
||||
result.Set("ipv6", Napi::String::New(env, std::string(dht::statusToStr(closing ? dht::NodeStatus::Disconnected : status6))));
|
||||
result.Set("ipv4",
|
||||
Napi::String::New(env,
|
||||
std::string(dht::statusToStr(closing ? dht::NodeStatus::Disconnected : status4))));
|
||||
result.Set("ipv6",
|
||||
Napi::String::New(env,
|
||||
std::string(dht::statusToStr(closing ? dht::NodeStatus::Disconnected : status6))));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user