Files
core/Peernet.go
Kleissner 3080119fc1 Initial working Kademlia network - peer list exchange is working!
Using the announcement and response messages to exchange peer lists. Fixes in encoding.
Add arbitrary Info structure to DHT Lite/Node.
2021-03-15 22:25:05 +01:00

26 lines
481 B
Go

/*
File Name: Peernet.go
Copyright: 2021 Peernet s.r.o.
Author: Peter Kleissner
*/
package core
// Init initializes the client. The config must be loaded first!
func Init() {
initPeerID()
initKademlia()
initMulticastIPv6()
initBroadcastIPv4()
initNetwork()
initSeedList()
}
// Connect starts bootstrapping and local peer discovery.
func Connect() {
go bootstrap()
go autoMulticastBroadcast()
go autoPingAll()
go networkChangeMonitor()
}