Reputation: 915
I have a node server running with Redis and SockJS. Redis gets messages over different channels. Is there a way to use these channels for websockets as well. First I found Primus (https://github.com/primus/primus) and was happy to have different channels (rooms) but then I saw it is only for the client side. The clients can send to different channels (rooms), but what I want is the other way around. On the server side is only the write
function to just send data to the connected sockets.
What I don't now is to add the channel to the message I sent and parse it on the socket client side. Is there an other way? I don't want to reinvent the wheel.
Upvotes: -1
Views: 203
Reputation: 915
Found the module https://github.com/cayasso/primus-multiplex. It does the job. The usage in the readme is well explaining how to use it.
Upvotes: 1