diff --git a/README.md b/README.md index bc59049919998571b63d40cbefd9e7834995353e..af20bd7160b90e9d7c3e6b616d506f838d69c237 100644 --- a/README.md +++ b/README.md @@ -70,17 +70,17 @@ int main() ```python import opendht as dht -r = dht.DhtRunner() -r.run() +node = dht.DhtRunner() +node.run() # Join the network through any running node, # here using a known bootstrap node. -r.bootstrap("bootstrap.ring.cx", "4222") - -r.put(dht.InfoHash.get("unique_key"), dht.Value(b'some binary data')) +node.bootstrap("bootstrap.ring.cx", "4222") # blocking call (provide callback arguments to make the call non-blocking) -results = r.get(dht.InfoHash.get("unique_key")) +node.put(dht.InfoHash.get("unique_key"), dht.Value(b'some binary data')) + +results = node.get(dht.InfoHash.get("unique_key")) for r in results: print(r) ```