MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / ConnectToServer

Method ConnectToServer

Sources/Main.cpp:939–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

937
938#if defined(WITH_MULTIPLAYER)
939void GameEventHandler::ConnectToServer(StringView endpoint, std::uint16_t defaultPort, StringView password)
940{
941 LOGI("[MP] Preparing connection to \"{}\"...", endpoint);
942
943 _networkManager = std::make_unique<NetworkManager>();
944 _networkManager->CreateClient(this, endpoint, defaultPort, 0xDEA00000 | (MultiplayerProtocolVersion & 0x000FFFFF));
945
946 auto& serverConfig = _networkManager->GetServerConfiguration();
947 serverConfig.ServerPassword = password;
948}
949
950bool GameEventHandler::CreateServer(ServerInitialization&& serverInit)
951{

Callers

nothing calls this directly

Calls 1

CreateClientMethod · 0.45

Tested by

no test coverage detected