Skip to content

zmumi/kad-consistency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kad Consistency

Extension with simple consistency checks for Kad.

Usage

Install with NPM.

npm install kad kad-consistency

Integrate with your Kad project.

var kad = require('kad');
var consistency = require('kad-consistency');
var Node = consistency.ConsistentNode(kad.Node);

var seed = {
  address: '127.0.0.1',
  port: 1338
};

var dht = new Node({
  transport: kad.transports.UDP(kad.contacts.AddressPortContact({
    address: '127.0.0.1',
    port: 1337
  })),
  storage: kad.storage.FS('path/to/datadir')
});

dht.connect(seed, function(err) {
  // dht.get(key, callback);
  // dht.put(key, value, callback);
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published