Client/Server Interaction Question
Posted: 16 Sep 2010, 19:16
Can someone suggest the best approach for coordinating data between the client and server that relates to the user. If I'm understanding the documentation properly, it would seem that user variables are more appropriate for broadcasting information between users in a room - not synchronizing the state of a user between the client and server.
For example,
1. When the user logs in - what's the best way to return profile information from the server back to the client (such as Avatar details) - setUserVariables or include it in a sendResponse?
2. When the user changes the avatar on the client-side, what's the best mechanism to send the changes to the server AND do you wait for the server to confirm the changes before applying them on the client.
Any advice on general approach is greatly appreciated.
Thanks!
For example,
1. When the user logs in - what's the best way to return profile information from the server back to the client (such as Avatar details) - setUserVariables or include it in a sendResponse?
2. When the user changes the avatar on the client-side, what's the best mechanism to send the changes to the server AND do you wait for the server to confirm the changes before applying them on the client.
Any advice on general approach is greatly appreciated.
Thanks!