Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

README tweaks

  • Loading branch information...
commit 2ad370fba0f51d92677b53edc7c017b130644779 1 parent 44148dd
@nikhilm authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 README.md
View
7 README.md
@@ -11,10 +11,11 @@ Use:
var dht = require('kademlia')
var node = new dht.KNode({ address: 'IP address', port: portNumber });
node.connect('existing peer ip', port);
- node.set('key', data);
+ node.set('foo', 'bar');
- node.get('key', function(err, data) {
+ node.get('foo', function(err, data) {
console.log("Retrieved", data, "from DHT");
+ console.log(data == 'bar');
});
API
@@ -26,7 +27,7 @@ The KNode represents a Kademlia node and handles all communication and storage.
This should be the only thing you need to interact with the Kademlia overlay
network.
-#### constructor(configuration)
+#### KNode(configuration)
A KNode is created by passing it an object having `address` and `port`
properties. The node will bind to `port` and start running.
Please sign in to comment.
Something went wrong with that request. Please try again.