| 47 | } |
| 48 | |
| 49 | int AFCWorldNetModule::StartServer() |
| 50 | { |
| 51 | auto ret = m_pNetServiceManagerModule->CreateServer(); |
| 52 | ret.Then([=](const std::pair<bool, std::string>& resp) { |
| 53 | if (!resp.first) |
| 54 | { |
| 55 | ARK_LOG_ERROR( |
| 56 | "Cannot start server net, busid = {}, error = {}", m_pBusModule->GetSelfBusName(), resp.second); |
| 57 | ARK_ASSERT_NO_EFFECT(0); |
| 58 | exit(0); |
| 59 | } |
| 60 | |
| 61 | m_pNetServer = m_pNetServiceManagerModule->GetSelfNetServer(); |
| 62 | if (m_pNetServer == nullptr) |
| 63 | { |
| 64 | ARK_LOG_ERROR("Cannot find server net, busid = {}", m_pBusModule->GetSelfBusName()); |
| 65 | exit(0); |
| 66 | } |
| 67 | }); |
| 68 | |
| 69 | return 0; |
| 70 | } |
| 71 | |
| 72 | //bool AFCWorldNetModule::PreUpdate() |
| 73 | //{ |
nothing calls this directly
no test coverage detected