Beispiel #1
0
func helpRun(b *lazlo.Broker) {
	cb := b.MessageCallback(`(?i)help`, true)
	for {
		pm := <-cb.Chan
		go getHelp(b, &pm)
	}
}
Beispiel #2
0
func pingRun(b *lazlo.Broker) {
	cb := b.MessageCallback(`(?i)(ping|syn)`, true)
	for {
		pm := <-cb.Chan
		pm.Event.Reply(randReply())
	}
}