Hi again.
My goal this time is to create hidden variable per user, which can be read only from the server.
I tried to do this using the user variables and limbo room, but the user can sniff the data sent and the user object is there, where are attached all user variables.
The obvious way is to do that using database, but I was wondering if there is another way, as I guess this is pretty common case...
Hidden variables
Each User and Room object exposes a properties object where you can store any transient state.
The object is a java Map<String, Object>
No need to use a database unless you need that data to be persistent.
In any case you can use the properties object to store the data until the User disconnects, then you can save everything to the DB in one shot.
By checking the server side documentation you can find more info
Hope it helps
The object is a java Map<String, Object>
No need to use a database unless you need that data to be persistent.
In any case you can use the properties object to store the data until the User disconnects, then you can save everything to the DB in one shot.
By checking the server side documentation you can find more info
Hope it helps
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 63 guests