You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
612 B
Go
31 lines
612 B
Go
11 months ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"os/signal"
|
||
|
"syscall"
|
||
|
)
|
||
|
|
||
|
var MulticastEntity AbstractMulticast
|
||
|
var BstChannel = make(chan string, 1)
|
||
|
|
||
|
const numberlenght = 18
|
||
|
|
||
|
func main() {
|
||
|
|
||
|
MulticastEntity.GetMulticastReady()
|
||
|
go MulticastEntity.WriteNumberToMulticast()
|
||
|
go MulticastEntity.ReadNumberFromMulticast()
|
||
|
go ZoreideBridge.BeTheBeta()
|
||
|
go ZoreideBridge.WaitForBeAlpha()
|
||
|
|
||
|
// Just a nice way to wait until the Operating system sends a kill signal.
|
||
|
// select{} was just horrible.
|
||
|
c := make(chan os.Signal, 1)
|
||
|
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||
|
<-c
|
||
|
ZoreideBridge.removeIPandBridgeInt()
|
||
|
os.Exit(0)
|
||
|
|
||
|
}
|