angular-socket-io
angular-socket-io copied to clipboard
connect to socket for specific user
How would I use this to only update the specific user.
Currently the socket I have set up updates a collection for any updates by any user. How would I limit the updates on my view to the ones done by someone logged in with my username (i.e. mine or me on another device.)
Is there a simple way to register for certain updates?
Currently have in my Angular
socket.syncUpdates('transaction', transactions);
and in my Node Server
socket.emit('transaction:save', doc);
Thanks. Ben
u can join user socket to a common room and then emit 'transaction:save' to the room and update all the sockets inside