(event_msg EventMsg)
| 315 | } |
| 316 | |
| 317 | func (this *module) handle_rpc(event_msg EventMsg) { |
| 318 | rpc_msg := event_msg.(*RpcEventMsg) |
| 319 | if handler, ok := this.rpc_handler_map[rpc_msg.RpcName]; ok == true { |
| 320 | ctx := this.context |
| 321 | ctx.s = rpc_msg.Sender |
| 322 | handler(ctx, rpc_msg.Data) |
| 323 | ctx.Reset() |
| 324 | } else { |
| 325 | slog.LogError("module", "module [%v] unregister rpc handler! rpc name:[%v]", this.name, rpc_msg.RpcName) |
| 326 | } |
| 327 | event_msg.Reset() |
| 328 | this.rpc_msg_pool.Put(rpc_msg) |
| 329 | } |
no test coverage detected