Utility to pipe Node.js streams over WebSockets in a native way.
net.Socket in your browser :)
$ npm install ws-streamify
It has support for Node.js >= 0.12. Almost zero dependencies (for browsers, however, it requires polyfills for some Node.js core libraries which is not a problem with webpack or browserify).
// socket is a W3C compliant WebSocket object// options is a common options object for Node.js streamssocket options
// client.jslet socket = 'ws://localhost:8000'let stream = socket highWaterMark: 1024
$ npm install $ npm test
$ npm install $ npm start
It will start a server on localhost with a simple example page. You can click on it and it will read text from the stream and print it. In the terminal and browser consoles flow control messages will appear. Also, check
Network -> ws://localhost:8000/ -> Frames in the Chrome DevTools.