| 111 | //} |
| 112 | |
| 113 | bool AFCMsgModule::SendMsgByAppType(const ARK_APP_TYPE app_type, const int msg_id, const google::protobuf::Message& msg, |
| 114 | const AFGUID& guid /* = NULL_GUID*/) |
| 115 | { |
| 116 | auto pClientService = m_pNetServiceManagerModule->GetClientService(app_type); |
| 117 | if (pClientService == nullptr) |
| 118 | { |
| 119 | ARK_LOG_ERROR("net client service not be found, src_bus={} app_type={} msg_id={} actor_id={}", |
| 120 | m_pBusModule->GetSelfBusID(), (uint8_t)app_type, msg_id, guid); |
| 121 | return false; |
| 122 | } |
| 123 | |
| 124 | auto busid = m_pBusModule->GetSelfBusID(); |
| 125 | auto pConnetionInfo = pClientService->GetSuitableConnect(AFMisc::ToString(busid)); |
| 126 | if (pConnetionInfo == nullptr) |
| 127 | { |
| 128 | ARK_LOG_ERROR("connection info not be found, src_bus={} app_type={} msg_id={} actor_id={}", |
| 129 | m_pBusModule->GetSelfBusID(), (uint8_t)app_type, msg_id, guid); |
| 130 | return false; |
| 131 | } |
| 132 | |
| 133 | return SendMsg(pConnetionInfo->net_client_, busid, pConnetionInfo->server_bus_id_, msg_id, msg, guid); |
| 134 | } |
| 135 | |
| 136 | bool AFCMsgModule::SendMsgByBusID( |
| 137 | const int bus_id, const int msg_id, const google::protobuf::Message& msg, const AFGUID& guid /* = NULL_GUID*/) |
nothing calls this directly
no test coverage detected