We are using Flexmatch to setup matchmaking for our Unreal Engine game.
My game client is receiving a response back from my api containing all matchmaking details including IP, port, playerid, and playersessionid.
My player sessions are timing out as the Unreal game server does not seem to be validating the connection. Here is the validating code on the server:
void AGameMode::PreLogin(const FString& Options, const FString& Address, const FUniqueNetIdRepl& UniqueId, FString& ErrorMessage)
Super::PreLogin(Options, Address, UniqueId, ErrorMessage);
FString playerSessionId = UniqueId.ToString();
FGameLiftServerSDKModule* gameLiftSdkModule = &FModuleManager::LoadModuleChecked(FName(“GameLiftServerSDK”));
FGameLiftGenericOutcome outcome = gameLiftSdkModule->AcceptPlayerSession(*playerSessionId);
At the moment I am calling ClientTravel on the game client with the returned ip and port to connect to the game, but the aws documentation says specifically “A connection request for a matched game session should include a player session ID and a player ID.” so this is probably the issue.
Hence the main question is:
How does the client send the playersessionid (it gets from a match) to the prelogin function on the server?