I am trying to learn threads and I have a bit of a problem to get it working correctly.
In this example, I just would like to push a static object on the stream and channel to respond to my servers.
Here is what I still have, but a lot of this does not work. If I could just get a stream for output to the console, I can figure out how to pass it in response.
var Readable = require('stream').Readable; var MyStream = function(options) { Readable.call(this); }; MyStream.prototype._read = function(n) { this.push(chunk); }; var stream = new MyStream({objectMode: true}); s.push({test: true}); request.reply(s);
doremi
source share