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?
-- 
https://code.launchpad.net/~widelands-dev/widelands/net-relay/+merge/332386
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/nethost-split.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to