2014-07-23 04:48:30 -07:00
|
|
|
package dht
|
|
|
|
|
2014-07-28 22:14:27 -07:00
|
|
|
import (
|
|
|
|
swarm "github.com/jbenet/go-ipfs/swarm"
|
|
|
|
)
|
|
|
|
|
2014-07-23 04:48:30 -07:00
|
|
|
// TODO. SEE https://github.com/jbenet/node-ipfs/blob/master/submodules/ipfs-dht/index.js
|
|
|
|
|
|
|
|
|
|
|
|
// IpfsDHT is an implementation of Kademlia with Coral and S/Kademlia modifications.
|
|
|
|
// It is used to implement the base IpfsRouting module.
|
|
|
|
type IpfsDHT struct {
|
|
|
|
routes RoutingTable
|
2014-07-28 22:14:27 -07:00
|
|
|
|
|
|
|
network *swarm.Swarm
|
|
|
|
}
|
|
|
|
|
|
|
|
func (dht *IpfsDHT) handleMessages() {
|
|
|
|
for mes := range dht.network.Chan.Incoming {
|
|
|
|
|
|
|
|
}
|
2014-07-23 04:48:30 -07:00
|
|
|
}
|