javascript - NodeJS connect two user among many of loggedin? -


i'm experimenting node.js , made cool chat application followed article using socet.io!

then have added authentication system using passport.js test site.

how this: among many users, user x want send kinds of notification user y not other users!!

i using emit() function custom event called notifybuzz when user send notification goes accounts!!

this article mentions need use form socket.broadcast.emit('hi'); send limited recipients. challenge keep track of socket connections, , relate user information them. once that's done, you'll know socket send message over.

best of luck!


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -