I am familiar with the "old" nodejs stream, so the need of Duplex steam "streams that are both Readable and Writable (for example, net.Socket)" seem quite obvious.
Examples of Duplex streams include:
- TCP sockets
- zlib streams
- crypto streams
When I am studying nodejs18 new features and find nodejs has added Web Streams API. I was a bit surprised to see web streams only has 3 steam types, i.e. it lacks of Duplex stream. I notice it is because https://streams.spec.whatwg.org/ only defines 3 types of streams. But why ? Doesn't the need for a both Readable and Writable stream obvious?