MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / OnNetMsg

Method OnNetMsg

src/plugin/net/src/AFCNetClientService.cpp:303–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303void AFCNetClientService::OnNetMsg(const AFNetMsg* msg)
304{
305 auto it = net_msg_callbacks_.find(msg->GetMsgId());
306
307 if (it != net_msg_callbacks_.end())
308 {
309 (it->second)(msg);
310 }
311 else
312 {
313 ARK_LOG_ERROR("Invalid message, id = {}", msg->GetMsgId());
314 // TODO:forward to other server process
315 }
316}
317
318void AFCNetClientService::OnNetEvent(const AFNetEvent* event)
319{

Callers

nothing calls this directly

Calls 3

GetMsgIdMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected