-
-
Save TooTallNate/e5e9c3b41d3d56e1ca56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Readable = require('stream').Readable; | |
var r = new Readable({ lowWaterMark: 0 }); | |
r._read = function (bytes, done) { | |
console.error('read %d bytes', bytes); | |
done(null, Buffer('test')); | |
}; | |
r.on('readable', function () { | |
console.error('readable event'); | |
}); | |
// unnecessary hack? | |
//r.read(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment