Skip to content

Commit

Permalink
pipe code removed
Browse files Browse the repository at this point in the history
  • Loading branch information
sidorares committed Aug 19, 2012
1 parent 23ac9c9 commit 43f5bf3
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,6 @@ var ShapeStream = function (byteRate, chunkRate, lowWatermark, highWatermark) {
}
util.inherits(ShapeStream, stream.Stream);

// dont' need these, use inherited Stream.pipe
/*
ShapeStream.prototype.pipe = function (dest, opts) {
var self = this;
dest.on('drain', function() {
if (self.paused)
self.resume();
});
self.on('data', function(data) {
var buffered = !dest.write(data);
if (buffered)
self.pause();
});
if (!opts || (opts && opts.end === true) || (opts && typeof opts.end === 'undefined'))
self.on('end', function() {
dest.end();
});
self.emit('pipe');
return dest;
};
*/

ShapeStream.prototype.expectedWritten = function() {
return parseInt(this.rate*(Date.now() - this.startTime)/1000);
}
Expand Down

0 comments on commit 43f5bf3

Please sign in to comment.