Project

dht

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby DHT hash
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

DHT

Build Status Dependency Status Code Climate Coverage Status Gem Version

A Ruby implementation of a Distributed Hash Table.

Basic usage

You can create instance of DHT::Hash and use like normal Hash

require 'dht/hash'

hash = DHT::Hash.new
hash[:key] = :value # => :value
hash[:key] # => :value

Advanced usage

You can create instance of DHT::Hash with few options

  • host - your IP address or domain
  • port - your open port where DHT::Hash will be listen
  • name - name of your node
  • node - bootstrap node
require 'dht/hash'

hash = DHT::Hash.new :host => "mydomain.com" # default 127.0.0.1
                     :port => 8080 # default 3000
                     :name => "my_name" # default "node"
                     :node => { :id => "bootstrap", :addr => 'tcp://domain.com:2042' } # boostrap node
                     :explorer => true # enable explorer