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

Method StartServer

src/server/world/src/AFCWorldNetModule.cpp:49–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49int 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//{

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