Exemple #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()
}
Exemple #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
}
Exemple #3
0
func (g *demoGenerator) Disconnection(n field.Node) {
	log.Printf("%s: Disonnection(%s): ignored", g.ID(), n.ID())
}
Exemple #4
0
func (g *demoGenerator) Connection(n field.Node) error {
	log.Printf("%s: Connection(%s): no", g.ID(), n.ID())
	return errNo
}