Exemplo n.º 1
0
func NewSkywireDaemon(sm *gnet.ServiceManager) *SkywireDaemon {
	var swd SkywireDaemon
	swd.ServiceManager = sm

	//associate service with channel 0
	swd.Service = sm.AddService([]byte("Skywire Daemon"), []byte(""), 0, &swd)

	return &swd
}
Exemplo n.º 2
0
func NewDaemonService(sm *gnet.ServiceManager, daemon *Daemon) *DaemonService {
	var swd DaemonService
	swd.Daemon = daemon
	swd.ServiceManager = sm
	//associate service with channel 0
	swd.Service = sm.AddService(
		[]byte("Skywire Daemon"),
		[]byte("{service:'Skywire Daemon',version=0"),
		0, &swd)

	return &swd
}