0

I'm trying to make an chat application that supports multiple instance of private conversation between two people. ( similar to facebook's messaging system )

I'm trying to use sockjs to do so, but I am having trouble creating a new instance of sockjs connection for every user - user combination.

Are there any tools that could help me with this?

I've tried multiplexing, but it seems to separate the channel instance, but still share the same connection. ( meaning, people on a different 'channel' are still able to receive my message )

Eugene Choi
  • 113
  • 8

1 Answers1

0

You could use the 'Rooms' approach of socket.io , this will let you have a dedicated "channel" per user.

io.on('connection', function(socket){
  socket.join(userID + '_room');
});

Another option is to use dedicate chat servers (http://prosody.im/, ejabberd, and many more).

JAR.JAR.beans
  • 9,668
  • 4
  • 45
  • 57