Search code examples
socket.io-redis

How do i get data from multiple sockets in one node to another socket in another node


Basically my problem is mentioned in the image below at (4) but im trying to retrieve information that is held in sockets in a different node, how do i retrieve data from sockets in a different node?


Solution

  • Found the answer

    // sending to individual socketid (private message)
      socket.to(socketid).emit('hey', 'I just met you');
    

    but the one thing im curious about is whether this will work between the sockets placed in the different nodes, I'm guessing that it will.