| 105 | } |
| 106 | |
| 107 | void AFCNetServerService::OnNetMsg(const AFNetMsg* msg) |
| 108 | { |
| 109 | auto it = net_msg_callbacks_.find(msg->GetMsgId()); |
| 110 | if (it != net_msg_callbacks_.end()) |
| 111 | { |
| 112 | (it->second)(msg); |
| 113 | } |
| 114 | else |
| 115 | { |
| 116 | // TODO:forward to other server process |
| 117 | |
| 118 | ARK_LOG_ERROR("Invalid message, id = {}", msg->GetMsgId()); |
| 119 | |
| 120 | // for (const auto& iter : mxCallBackList) |
| 121 | //{ |
| 122 | // (iter)(head, msg_id, msg, msg_len, session_id); |
| 123 | //} |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | void AFCNetServerService::OnNetEvent(const AFNetEvent* event) |
| 128 | { |