At the moment, i store sockets for each client to emit.
clients[myID] = socket;
but i wonder if there is a lot of user it will be a problem. Is that it can be much to store clients in database like express store sessionID (using redis) ?
(i must to stock the entire socket to make it work ? so, it's big !)
What's the best way ?
I saw there was some time that could be do something like that:
sio.set('store',...
what is it ? How to use it ?
Or, i can store using redis normally ?
Thanks !
You can store just socket id and then access it later using io.sockets.sockets[id]
.
If you are trying to store socket in one process and then deal with it in another, that would obviously fail anyway.