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

Method StartServer

src/server/game/src/AFCGameNetModule.cpp:58–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58int AFCGameNetModule::StartServer()
59{
60 auto ret = m_pNetServiceManagerModule->CreateServer();
61 ret.Then([=](const std::pair<bool, std::string>& resp) {
62 if (!resp.first)
63 {
64 ARK_LOG_ERROR(
65 "Cannot start server net, busid = {}, error = {}", m_pBusModule->GetSelfBusName(), resp.second);
66 ARK_ASSERT_NO_EFFECT(0);
67 exit(0);
68 }
69
70 m_pNetServerService = m_pNetServiceManagerModule->GetSelfNetServer();
71 if (m_pNetServerService == nullptr)
72 {
73 ARK_LOG_ERROR("Cannot find server net, busid = {}", m_pBusModule->GetSelfBusName());
74 exit(0);
75 }
76
77 // m_pNetServerService->RegNetEventCallback(this, &AFCGameNetModule::OnSocketEvent);
78 });
79
80 return 0;
81}
82
83//bool AFCGameNetModule::PreUpdate()
84//{

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