Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect to socket for specific user #133

Open
Cogiva opened this issue Jan 2, 2016 · 1 comment
Open

connect to socket for specific user #133

Cogiva opened this issue Jan 2, 2016 · 1 comment

Comments

@Cogiva
Copy link

Cogiva commented Jan 2, 2016

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

@emps
Copy link

emps commented Jan 4, 2016

u can join user socket to a common room and then emit 'transaction:save' to the room and update all the sockets inside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants