I am noticing something that I don't think is right, but I could be completely wrong and am probably doing something wrong. Let me describe my scenario.
I have a Node.js server that is using a multiplexer to establish multiple channels with a sockjs service. The browser uses the sockjs client to send and receive data to the server on the channels I have established. I pretty much followed the Node.js multipliexer example from the Node.js source. Whenever a new connection is established with the server, a close and data event listener is added to the connection.
If I open my client side code in a single browser tab everything works fine. However when I start having multiple connections simultaneously I am noticing something that does not seem right. If I have 2 connections established because my client is opened in 2 browser tabs and one client sends data, I am noticing that BOTH data even listeners are being called with the data send from the one client. Is this expected? In my mind I would expect data send from client connection would only cause the data event for that connection to fire, not for all connections.
Any help is appreciated.
-Ryan