Hey, I'm trying to create a streaming parser/transformer for a special web proxy project. The 'streams2' stream.Transform base class makes this quite easy, but trying to benchmark some thing I've hit a problem: it seems no (end) events are emitted.
The docs don't list any events under this class explicitly, but one would imagine the events from the stream.Readable and stream.Writable are also implemented in stream.Transform. My question: Am I doing something wrong, is this by design, or could this be considered a bug? Al I could find on the subject is this Stack Overflow question<http://stackoverflow.com/questions/15413664/how-to-benchmark-node-js-streams>+ comment<http://stackoverflow.com/questions/15413664/how-to-benchmark-node-js-streams#comment22025481_15521845> Code (more or less): > stream = require('stream'); > function Parser (options) { > if (!(this instanceof Parser)) return new Parser(options); > stream.Transform.call(this, options); > this.options = options || {}; > } > util.inherits(Parser, stream.Transform); > Parser.prototype._transform = function(chunk, encoding, done) { > // magic stuff that transforms chunk > this.push(chunk); > done(); > }; > > parser = new Parser(); > parser.on('end', function () { > console.log('This will never happen ???'); > }); > req.pipe(parser, {end: false}).pipe(res); -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
