mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
use libuv for networking and event scheduling
This commit is contained in:
1 parent
22f54e7335
commit
d644a9fe01
18 files changed
+776
-452
No files matched your search
+4
-1
@@ -39,7 +39,7 @@ void print_id_req() {
|
||||
}
|
||||
|
||||
void print_node_info(const std::shared_ptr<DhtRunner>& dht, const dht_params& params) {
|
||||
std::cout << "OpenDht node " << dht->getNodeId() << " running on port " << dht->getBoundPort() << std::endl;
|
||||
std::cout << "OpenDht node " << dht->getNodeId() << " running on port " << dht->getBound().toString() << std::endl;
|
||||
if (params.generate_identity)
|
||||
std::cout << "Public key ID " << dht->getId() << std::endl;
|
||||
}
|
||||
@@ -370,6 +370,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
dht->run(params.port, crt, true, params.network);
|
||||
dht->setOnStatusChanged([](dht::NodeStatus status4, dht::NodeStatus status6){
|
||||
std::cout << "Node status changed : IPv4:" << (unsigned)status4 << " IPv6:" << (unsigned)status6 << std::endl;
|
||||
});
|
||||
|
||||
if (params.log) {
|
||||
if (params.syslog or (params.daemonize and params.logfile.empty()))
|
||||
|
||||
Reference in new issue
Block a user