Duplex stream
A Node.js stream that is both readable and writable, with the two sides independent, such as a TCP socket.
In more detail
What you write to a socket goes to the other machine, and what you read comes from it. A Transform stream is a Duplex whose output is computed from its input.
Related terms
- Transform stream — A Duplex stream that changes data as it passes through, such as a compressor, a cipher or a packet parser.
- network socket — One end of a two-way network connection between programs, identified by an IP address and a port number.
- full duplex — Communication where both sides can send at the same time; one-way (unidirectional) communication only flows in one direction.
Taught in
- Native Compression: node:zlib & Streaming Codecs — Node.js Internals & Backend Services
- Transform Streams: Custom Packet Decoding & Codecs — Node.js Internals & Backend Services
- Child Processes: spawn, execFile, fork & IPC — Node.js Internals & Backend Services
- Native HTTP/2 Protocols: Multiplexed Streams & Push — Node.js Internals & Backend Services