Get port in game when launch Dedicated Server

I know the port default is 7777 but when a launch mutiple server, 7778,7779,7780 also be used.So i wander the port of every server in game with blueprint or C++ code.

like the log msg of Dedicated Server

[2016.01.05-07.34.29:967][ 0]LogNet: GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7779

I think there must be a way to get it?can anybody help?any help is awesome.Thinks a lot :slight_smile:

All right…I have got the answer.Just to use GetWorld()->GetAddressURL().

hi, thanks for introduce get port api. but, do you know method to get dedicated server port? i want to get that port. this api is client’s location port.

hy i same problem what i can do