Exemplo n.º 1
0
func (t *EchoService) Echo(args *Msg.EchoRequest, reply *Msg.EchoResponse) error {
	//t.Lock()
	//defer t.Unlock()
	reply.Msg = proto.String("Echo:" + args.GetMsg())
	t.count++
	log.Trace(strconv.Itoa(int(t.count)))
	time.Sleep(time.Second * 4)
	return nil
}
Exemplo n.º 2
0
func (t *EchoService) EchoTwice(args *Msg.EchoRequest, reply *Msg.EchoResponse) error {
	reply.Msg = proto.String("EchoTwice:" + args.GetMsg() + args.GetMsg())
	return nil
}