Files
core/Peernet.go
Kleissner b53ab7c7b3 Reworked connection code. Pings are now regularly sent out to every connection to check if it remains valid.
Invalid connections are moved to a second list, and eventually dropped if they don't become active.
2021-02-28 20:59:39 +01:00

24 lines
447 B
Go

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