Beispiel #1
0
func (g *demoGenerator) Disconnect(n field.Node) {
	if _, ok := n.(audioReceiver); !ok {
		log.Printf("%s not audioReceiver", n.ID())
		return
	}
	g.disconnects <- n.ID()
}
Beispiel #2
0
func (g *demoGenerator) Connect(n field.Node) error {
	r, ok := n.(audioReceiver)
	if !ok {
		return fmt.Errorf("%s not audioReceiver", n.ID())
	}
	req := connectRequest{r, make(chan error)}
	g.connects <- req
	return <-req.e
}
Beispiel #3
0
func (g *demoGenerator) Disconnection(n field.Node) {
	log.Printf("%s: Disonnection(%s): ignored", g.ID(), n.ID())
}
Beispiel #4
0
func (g *demoGenerator) Connection(n field.Node) error {
	log.Printf("%s: Connection(%s): no", g.ID(), n.ID())
	return errNo
}