You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, there is a way to access to the sockets list connected to other sails app/node?
I have 2 sails app exactly the same in different ports, the difference with the rest of the guys of #3008 is that I'm not using the pubsub events of publishCreate of publishUpdate to fire the information, because some events are not related to waterline models. I'm appending a list of permissions over every socket based on the user type, so when certain event happen on the app is goes through sails.io.sockets, get the list of the sockets that contains the permission to receive the data of the event and then does a socket.emit to all that sockets of the list (one by one). Obviously in one server instance work fine, the issue is in multi instance, because even setting up redis to store the socket session, seems that I can't get the list of sockets from the other node.
The text was updated successfully, but these errors were encountered:
You don't need a list of the sockets. You just need them to all join a room , and then broadcast to that room. In this case, each permission type could have its own room, then you just do (for example):
Hi @JoaoLucas89, sorry to hear that. If you're having problems with socket broadcasts, please open a new issue with a description (including steps to reproduce) and we'll take a look!
Hi guys, there is a way to access to the sockets list connected to other sails app/node?
I have 2 sails app exactly the same in different ports, the difference with the rest of the guys of #3008 is that I'm not using the pubsub events of publishCreate of publishUpdate to fire the information, because some events are not related to waterline models. I'm appending a list of permissions over every socket based on the user type, so when certain event happen on the app is goes through sails.io.sockets, get the list of the sockets that contains the permission to receive the data of the event and then does a socket.emit to all that sockets of the list (one by one). Obviously in one server instance work fine, the issue is in multi instance, because even setting up redis to store the socket session, seems that I can't get the list of sockets from the other node.
The text was updated successfully, but these errors were encountered: