func main() { cine.Init("127.0.0.1:8000") phonebook := Phonebook{cine.Actor{}, make(map[string]int)} pid := cine.StartActor(&phonebook) cine.Cast(pid, nil, (*Phonebook).Add, "Jane", 1234) ret, _ := cine.Call(pid, (*Phonebook).Lookup, "Jane") number := ret[0].(int) log.Infoln("number:", number) // Out: number: 1234 }
func (p *PlayerProxy) Pong(sender cine.Pid, count int) { cine.Cast(p.Pid, nil, (*Player).HandlePong, sender, count) }