Esempio n. 1
0
File: core.go Progetto: jessta/ogo
func (b *BasicApplication) SendEchoReply(dpid string) {
	req := ofp10.NewEchoReply()
	s, ok := GetSwitch(dpid)
	if ok {
		<-time.After(time.Second * 1)
		s.Send(req)
	}
}
Esempio n. 2
0
File: core.go Progetto: postfix/ogo
func (o *OgoInstance) EchoRequest(dpid net.HardwareAddr) {
	// Wait three seconds then send an echo_reply message.
	go func() {
		<-time.After(time.Second * 3)
		if sw, ok := Switch(dpid); ok {
			res := ofp10.NewEchoReply()
			sw.Send(res)
		}
	}()
}