可读流
Readable streams are an abstraction for a source from which data is consumed.
Examples of Readable
streams include:
- HTTP responses, on the client
- HTTP requests, on the server
- fs read streams
- zlib streams
- crypto streams
- TCP sockets
- child process stdout and stderr
process.stdin
All Readable
streams implement the interface defined by the
stream.Readable
class.