duplexpair
Make a full duplex stream with 2 Duplex endpoints.
Note:
This is a fork of duplexpair
, changed to use the "native" Duplex
stream that is part
of Node.JS instead of the version from the readable-stream
package.
Install:
npm install native-duplexpair
const DuplexPair = ; const socket1 socket2 = ; socket1;console; // => <Buffer 48 69> // Or, using options that are passed to the Duplex constructor: const socket1 socket2 = encoding: 'utf8' ; socket1;console; // => 'Hi'
License
MIT