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

Method StartServer

src/server/proxy/src/AFCProxyNetModule.cpp:42–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42int AFCProxyNetModule::StartServer()
43{
44 auto ret = m_pNetServiceManagerModule->CreateServer();
45 ret.Then([=](const std::pair<bool, std::string>& resp) {
46 if (!resp.first)
47 {
48 ARK_LOG_ERROR(
49 "Cannot start server net, busid = {}, error = {}", m_pBusModule->GetSelfBusName(), resp.second);
50 ARK_ASSERT_NO_EFFECT(0);
51 exit(0);
52 }
53
54 m_pNetServer = m_pNetServiceManagerModule->GetSelfNetServer();
55 if (m_pNetServer == nullptr)
56 {
57 ARK_LOG_ERROR("Cannot find server net, busid = {}", m_pBusModule->GetSelfBusName());
58 exit(0);
59 }
60 });
61
62 return 0;
63}
64
65void AFCProxyNetModule::OnServerInfoProcess(const AFNetMsg* msg, const int64_t session_id) {}
66

Callers

nothing calls this directly

Calls 4

CreateServerMethod · 0.80
ThenMethod · 0.80
GetSelfBusNameMethod · 0.80
GetSelfNetServerMethod · 0.80

Tested by

no test coverage detected