Ejemplo n.º 1
0
func main() {

	var quit1 chan int

	//create the daemon
	config := daemon.NewConfig()
	//config.Daemon.LocalhostOnly = true
	//config.DHT.Disabled = true
	config.Daemon.Port = 8080
	daemon := daemon.NewDaemon(config)

	//create aether server

	pubkey, seckey := cipher.GenerateDeterministicKeyPair([]byte("seed"))
	_ = seckey
	_ = pubkey

	a := aether.NewAetherServer(pubkey)

	a.RegisterWithDaemon(daemon)

	//start daemon mainloop
	go daemon.Start(quit1)

}
Ejemplo n.º 2
0
func NewDaemon(port int) *daemon.Daemon {

	config := daemon.NewConfig()
	//config.Daemon.LocalhostOnly = true
	config.Daemon.Port = port
	config.DHT.Disabled = true
	daemon := daemon.NewDaemon(config)
	return daemon
	//var swd SkywireDaemon
	//swd.ServiceManager = sm
	//associate service with channel 0
	//swd.Service = sm.AddService([]byte("Skywire Daemon"), 0, &swd)

}