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
Post a Comment