Permalink
Browse files

README tweaks

  • Loading branch information...
1 parent 44148dd commit 2ad370fba0f51d92677b53edc7c017b130644779 @nikhilm committed Mar 20, 2012
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.

0 comments on commit 2ad370f

Please sign in to comment.