function bufferToStream(buffer) { const stream = new _stream.Duplex(); stream.push(buffer); stream.push(null); return stream; }
function write (chunk, encoding, cb) { if (typeof chunk !== 'string' && !(chunk instanceof Buffer)) { throw new TypeError('Invalid data, chunk must be a string or buffer, not ' + typeof chunk) } /* hex Dump: outcoming */ if (self._output) { if (!hexPipeStarted) { debug('Hex Dump started.') hexPipeStarted = true hexer.pipe(self._output) } hexer.write(chunk) } debug('Sending chunk:', chunk, 'to', self._address) /* waitTime before close */ waitTimer.call(self) /* write to stream */ return stream.Duplex.prototype.write.apply(this, arguments) }
success = true; else if (streamType === 'duplex' && value instanceof StreamModule.Duplex){ success = true;
Stream.Duplex.call(this); var ACBI = this;
return stream.Duplex.prototype.write.apply(socket, arguments)
input.setValue(new stream.Duplex());