“ns.exitgames.com:5058” is the address of nameserver. ‘nameserverAddress’ is more appropriate name for the variable.
Please send full application log and call stack of error.
Does demo-particle work for you? It does exactly the same - calls connectToRegionMaster().
Command-line demo turnbased.lua (run ‘lua turnbased.lua’ from ‘demo-console’ folder) also shows Getregions() usage.
As soon as client is connected to the master (LoadBalancingClient.State.ConnectedToMaster state), you can call client.masterPeer:getRoundTripTime() which returns time required to send last operation to a server and get response from it. Note that ‘masterPeer’ property is not a part of public api currently but still can be safely used.
You can also try to send some requests to master server before measuring rtt. E.g. call client:requestLobbyStats() after getting to LoadBalancingClient.State.JoinedLobby state and read result in client:onLobbyStats()