Files
core/Peernet.go
Kleissner ff9804bf6d Start with the store code. Properly handle announcement requests.
Add core data functions: Data2Hash, GetData, GetDataLocal, GetDataDHT, StoreDataLocal, StoreDataDHT
2021-04-10 16:00:43 +02:00

27 lines
495 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()
initStore()
}
// Connect starts bootstrapping and local peer discovery.
func Connect() {
go bootstrap()
go autoMulticastBroadcast()
go autoPingAll()
go networkChangeMonitor()
}