¥Class: stream.Duplex
stream.Duplex
当检查 instanceof stream.Writable 时,Duplex 的实例现在返回 true。
instanceof stream.Writable
Duplex
true
新增于: v0.9.4
双工流是同时实现 Readable 和 Writable 接口的流。
Readable
Writable
¥Duplex streams are streams that implement both the Readable and Writable interfaces.
Duplex 流的示例包括:
¥Examples of Duplex streams include:
TCP 套接字
¥TCP sockets
zlib 流
¥zlib streams
加密流
¥crypto streams