Hi, I am trying to add concurrent server processes to my instance. I wonder how to make sure the activation succeeds for the instances with concurrent process. In my activation code for gamelfit in UE, IU hardcoded port 7777. How can I make this dynamic. I am not understanding the flow.
params->OnStartGameSession.BindLambda(onGameSession);
//OnProcessTerminate callback. GameLift invokes this before shutting down the instance
//that is hosting this game server to give it time to gracefully shut down on its own.
//In this example, we simply tell GameLift we are indeed going to shut down.
params->OnTerminate.BindLambda([=]() {gameLiftSdkModule->ProcessEnding(); });
//HealthCheck callback. GameLift invokes this callback about every 60 seconds. By default,
//GameLift API automatically responds 'true'. A game can optionally perform checks on
//dependencies and such and report status based on this info. If no response is received
//within 60 seconds, health status is recorded as 'false'.
//In this example, we're always healthy!
params->OnHealthCheck.BindLambda([]() {return true; });
//Here, the game server tells GameLift what port it is listening on for incoming player
//connections. In this example, the port is hardcoded for simplicity. Since active game
//that are on the same instance must have unique ports, you may want to assign port values
//from a range, such as:
//int32 port = FURL::UrlConfig.DefaultPort;
//params->port;
params->port = 7777;
gameLiftSdkModule->ProcessReady(*params);
So how can I make sure the port I am selecting is the exact port at which matchmaking happened and the session is running?