fastdht

package module
v0.0.0-...-1886c04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2015 License: Apache-2.0 Imports: 9 Imported by: 1

README

#fastdht

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BOOTSTRAP []string = []string{
	"67.215.246.10:6881",
	"212.129.33.50:6881",
	"82.221.103.244:6881"}

Functions

func Neighbor

func Neighbor(target string, nid string) string

Types

type DHT

type DHT struct {
	Ip      string
	Port    int
	Address *net.UDPAddr
	Conn    *net.UDPConn
	NodeId  Id
	Table   table
}

func NewDHT

func NewDHT(ip string, port int) (dht *DHT, err error)

func (*DHT) Run

func (dht *DHT) Run(out chan string)

type Id

type Id []byte

func (Id) Hex

func (i Id) Hex() string

func (Id) Neighbor

func (i Id) Neighbor(nid string) string

func (Id) String

func (i Id) String() string

type Node

type Node struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL