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

Method StartServer

src/server/router/src/AFCRouterNetModule.cpp:40–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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