You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to set a variable on a socket connection to be permanently there?
For example: io.on('connection', client => { client.lobby_id = "sadjasdhjkas"; });
I want client.id to be there until it disconnects obviously. Would this mean that the variable lobby_id will always be there for that client socket connection, and could i access it in any events?
The text was updated successfully, but these errors were encountered:
Is it possible to set a variable on a socket connection to be permanently there?
For example:
io.on('connection', client => { client.lobby_id = "sadjasdhjkas"; });
I want client.id to be there until it disconnects obviously. Would this mean that the variable lobby_id will always be there for that client socket connection, and could i access it in any events?
The text was updated successfully, but these errors were encountered: