Closed ambrons closed 5 years ago
Hi @ambrons this was intentional. The effect of this code, is that if the game supplies the option countConnections
on the server options, then the game will send a message to a lance server which counts how many players have connected wordwide.
See the constructor documentation for ServerEngine
at http://docs.lance.gg/ServerEngine.html
Okay and why exactly would I want this to happen on http://ping.games-eu.lance.gg:2000
rather than on my own node server?
it's a simple ping to our lance server, to let us know if players are connecting to the Lance sample games.
Still, I agree with ambrons that the address shouldn't be hardcoded. Since the pinging code is directly in the library rather then in the example, it should be configurable. I also wonder what the GDPR says about collecting this kind of data without user conscent.
I'm assuming this was an oops, but you have a hardcoded hostname for pinging latency in the NetworkMonitor class when a player registers.
https://github.com/lance-gg/lance/blob/master/src/network/NetworkMonitor.js#L64