SocketCluster / socketcluster

Highly scalable realtime pub/sub and RPC framework
https://socketcluster.io
MIT License
6.15k stars 314 forks source link

Save temp data into server socket object #102

Closed bamoo456 closed 9 years ago

bamoo456 commented 9 years ago

Hello socketcluster team,

Few questions need your suggestions,

The scenario is that I have to save some temp data on each socket client, and all these temp data will be automatically be released when client offline.

Just wanna know does server socket object has any method can support this requirement. also, is that good to save temp data into socket object ?

Thanks for your reply,

jondubois commented 9 years ago

@bamoo456 If that data is temporary as you suggest (related to the life of the socket) and it's only relevant for that specific socket (doesn't need to be accessed by other sockets) then yes, it's OK to store data on the socket object on the server.

bamoo456 commented 9 years ago

@jondubois sounds good,

thanks for your quick reply :+1: