This is the output we expect and should be the same regardless of any solution.
Note that WSRewriter
and ProxySocket
receive different values and the client receives only one message.
> node streams.js
Solution *
WSRewriter: <Buffer 61 20 6d 65 73 73 61 67 65 20 66 72 6f 6d 20 74 68 65 20 66 72 6f 6e 74 65 6e 64 0a>
ProxySocket: <Buffer 41 20 6d 65 73 73 61 67 65 20 66 72 6f 6d 20 57 53 52 65 77 72 69 74 65 72 0a>
'a message from the frontend' can be thought of as a jupyter message generated client side.
> nc localhost 3000
Solution *
a message from the frontend
A message from the ProxySocket