How to find free port for server?

If I want to start a several UE4 servers (maybe dedicated also) with different free prots, what I need to do?

Is there any ways to do it? For example function like “FindFreePort()”?

did u find a solution or answer?

No for now. Also there no any ways to assign port immediately. So Engine->Browse(FURL) does not helps me to change port (although FURL contains Port field).
Probably in this case we must use OnlineSubsystem for this operations, isn’t it?

This may help. LoOK in to port

It’s command line argument, so this port will be specified only with starting the executable. But if I need to change port with browsing to new map?

i asked about that runtime port change issue in slack groupt. here is answer:

ahsan [1:43 PM anyone knows how to
change port number of a host server

moss [1:47 PM] it’s in your
Engine.ini file [1:47] check the
base engine file and you will know
what to override in your game configs

ahsan [2:02 PM] hmm.i wonder it
cannot be changed on runtime .

moss [2:08 PM] on rumtime you would
have to change the variable within
UEngine, just search the config name
in engine source so you know and where
the engines uses it

[2:09] when you are at a point where
you do not know what to do check the

i will not be able to get chance to look into it before monday. so for now i am leaving it here

Thank you, Muzaheed!