diff --git a/README.md b/README.md index 8433a9d00edcbd82bb74aec73e4709be9320497c..a8f7c3cedd422dcfc897a6b0d6615f13db0d16de 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,18 @@ TODO Examples - ```c++ -dht::DhtRunner dht; +dht::DhtRunner node; // Launch a new dht node using generated RSA keys, // and listen on port 4222. -dht.run(4222, dht::crypto::generateIdentity()); +node.run(4222, dht::crypto::generateIdentity()); // put some data on the dht std::vector<uint8_t> some_data(5, 10); -dht.put("unique_key", some_data); +node.put("unique_key", some_data); // get data from the dht -dht.get("other_unique_key", [](const std::vector<std::shared_ptr<Value>>& values) { +node.get("other_unique_key", [](const std::vector<std::shared_ptr<Value>>& values) { // Callback called when values are found for (const auto& value : values) std::cout << "Found value: " << value << std::endl;