A memoized mux-demux stream connection
There are a few technical issues with websocket limitations in the browser. Namely the fact browsers can only open two websocket connections to the same domain.
Even worse then that. SockJS uses two websockets to do it's communication so you can only open one sockjs stream connection per domain.
To get around this issue cleanly it's easiest to use a library that allows you to open up a cached stream connection per domain so you never get into this issue.
There is a small issue with having a shared connection to a domain which is the data gets all messed up and mixed together. To get around this we should multiplex that connection by default (with mux-demux).
MuxMemo when given an uri returns you a
MuxDemux instance and
garantuees that you can have don't open up two sockjs
streams to the same domain.
var MuxMemo =WriteStream =var mdm1 =mdm2 =var stream1 = mdm1stream2 = mdm1stream2stream1
npm install mux-memo