MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / WaitForSession

Method WaitForSession

engine/Poseidon/Network/NetworkMisc.cpp:1227–1261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1225 {
1226 address.ip = value;
1227 address.port = DefaultNetworkPort;
1228 }
1229 }
1230
1231 if (startEnum)
1232 {
1233 return StartEnumHosts();
1234 }
1235 return true;
1236}
1237
1238void NetworkManager::Done()
1239{
1240 _client = nullptr;
1241 _server = nullptr;
1242 _sessionEnum = nullptr;
1243}
1244
1245// void NetworkManager::GetSessions(AutoArray<SessionInfo, MemAllocSA> &sessions)
1246void NetworkManager::GetSessions(AutoArray<SessionInfo>& sessions)
1247{
1248 if (_sessionEnum)
1249 {
1250 _sessionEnum->GetSessions(sessions);
1251 }
1252
1253 for (int i = 0; i < sessions.Size(); i++)
1254 {
1255 SessionInfo& info = sessions[i];
1256
1257 info.badActualVersion = info.actualVersion < MP_VERSION_REQUIRED;
1258 info.badRequiredVersion = MP_VERSION_ACTUAL < info.requiredVersion;
1259
1260 info.badMod = info.equalModRequired && stricmp(info.mod, ModSystem::GetModNames()) != 0;
1261 info.badTag = stricmp(info.versionTag, GetVersionTag()) != 0;
1262 }
1263}
1264

Callers 1

CreateClientFunction · 0.80

Calls 5

ProgressStartFunction · 0.85
LocalizeStringFunction · 0.85
GlobalTickCountFunction · 0.85
ProgressFinishFunction · 0.85
NSessionsMethod · 0.80

Tested by

no test coverage detected