4 ms·
When a game server connects to the master to be registered, what the master gets is the the IP address relatively to it. If this address happens to be accessibl
by getkey 10y ago
When a game server connects to the master to be registered, what the master gets is the the IP address relatively to it. If this address happens to be accessible from a client, everything's fine. However in some cases, it is not. For example in the case described where 127.0.0.1 is the game server's address (relatively to the master), if the master sent the address 127.0.0.1 to a client, it wouldn't connect.
So we need to find out the public IP address in some cases, but sometimes it is better to use the local IP address (for example if the master, the game server and a client are on the same network and the client is not allowed to access the internet).
So basically finding out which IP address the master must send to the client is a huge pain. WebRTC does it automatically (to traverse NATs).