How can I sync a part of state (i.e. player's hand or a just-drawn card) with only one player, so that others do not get the state? I want to protect against looking at socket's data in browser's dev console and modifying javascript to listen to another player's data, so simply .listen()
-ing to only a part of server's state is not an option...
Sync part of state with only one client
Right now you are not able to. You can, however, client.send()
specific parts to specific clients so the knowledge remains private.