2022-04-06_TIL

KRyun·2022년 4월 6일
0

TIL

목록 보기
27/36

Node js stream_velog

Understanding Streams in Node.js - NODESOURCE

What's the difference between end and finish events in Node streams - Stack Overflow

Error Handling with nodejs stream - stream.pipe 했을 때 에러 리스너 등록 방법은?

end and finish are the same event BUT on different types of Streams

  • stream.Readable fires ONLY end and NEVER finish
  • stream.Writable fires ONLY finish and NEVER end

Why the different naming of the same event?

The only reason I could think of is because of duplex streams (stream.Duplex), which implement both stream.Readable and stream.Writable interfaces

Node.js api - stream 공식문서

profile
신입 개발자입니다.

0개의 댓글