code: function IOStream(options) {
    if (!(this instanceof IOStream)) {
      return new IOStream(options);
    }
  
    IOStream.super_.call(this, options);
  
    this.options = options;
    this.id = uuid();
    this.socket = null;
  
    // Buffers
    this.pushBuffer = [];
    this.writeBuffer = [];
  
    // Op states
    this._readable = false;
    this._writable = false;
    this.destroyed = false;
  
    // default to *not* allowing half open sockets
    this.allowHalfOpen = options && options.allowHalfOpen || false;
  
    this.on('finish', this._onfinish);
    this.on('end', this._onend);
    this.on('error', this._onerror);
  }
docs: Duplex
  
  @param {Object} options
  @api private