Code review comment for lp:~widelands-dev/widelands/net-relay

Revision history for this message
Notabilis (notabilis27) wrote :

It turns out that the kRoundTripTimeResponse can't work as plant. It is returning the player IDs as seen by the relay, which are something different than the player IDs in the GameHost/Client code. The relay IDs are fine for the GameHost (who has the mapping) but of no use for GameClients. Answering ping messages is fine for both. So we could:

a) Only display the ping times at the GameHost. Should probably be fine since it is the only one who
is permitted to kick participants anyway.
b) Make the GameHost deliver the ping results to the GameClients. So the relay collects the data, the GameHost retrieves them and the GameClients can ask the GameHost about it. Kind of complicated but probably a cleaner design than c). The GameHost/GameClient exchange can be done in a later branch. (a and b result in the same code in this branch.)
c) Give the relay more information about the connected participants so it can use the GameHost/Client-IDs when returning ping results.
d) Do something great I haven't come up with yet.

Which one do you prefer?

« Back to merge proposal