MCPcopy
hub / github.com/aceld/zinx / Handle

Method Handle

examples/zinx_protobuf/client/client.go:18–29  ·  view source on GitHub ↗
(request ziface.IRequest)

Source from the content-addressed store, hash-verified

16}
17
18func (this *PositionClientRouter) Handle(request ziface.IRequest) {
19 fmt.Println("Handle....")
20
21 msg := &pb.Position{}
22 err := proto.Unmarshal(request.GetData(), msg)
23 if err != nil {
24 fmt.Println("Position Unmarshal error ", err, " data = ", request.GetData())
25 return
26 }
27
28 fmt.Printf("recv from server : msgId=%+v, data=%+v\n", request.GetMsgID(), msg)
29}
30
31// 客户端自定义业务
32func business(conn ziface.IConnection) {

Callers

nothing calls this directly

Calls 2

GetDataMethod · 0.65
GetMsgIDMethod · 0.65

Tested by

no test coverage detected