func (p *Actor) Bye(reason string) []byte { b, err := kodec.Boxing(kodec.BuildCmd(kodec.Cmd_UNAUTHORIZED, reason, tick())) if err != nil { log.Panic("build bye err", err) } return b }
func (p *Actor) Ping() []byte { b, err := kodec.Boxing(kodec.BuildCmd(kodec.Cmd_PING, "", tick())) if err != nil { log.Panic("build ping err", err) } return b }