mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-25 01:01:29 +00:00
18 lines
388 B
TypeScript
18 lines
388 B
TypeScript
import * as stream from 'stream';
|
|
const Readable = stream.Readable;
|
|
const DEFAULT_CHUNK_COLLECT_THRESHOLD = 20 * 1024 * 1024; // about 20 mb
|
|
|
|
/* tslint:disable:no-empty */
|
|
class CommonReadableStream extends Readable {
|
|
constructor() {
|
|
super({
|
|
highWaterMark: DEFAULT_CHUNK_COLLECT_THRESHOLD * 5,
|
|
});
|
|
}
|
|
public _read(): void {
|
|
|
|
}
|
|
}
|
|
|
|
export default CommonReadableStream;
|