code: function BIP151(cipher) {
    if (!(this instanceof BIP151))
      return new BIP151(cipher);
  
    EventEmitter.call(this);
  
    this.input = new BIP151Stream(cipher);
    this.output = new BIP151Stream(cipher);
  
    this.initReceived = false;
    this.ackReceived = false;
    this.initSent = false;
    this.ackSent = false;
    this.completed = false;
    this.handshake = false;
  
    this.pending = [];
    this.total = 0;
    this.waiting = 4;
    this.hasSize = false;
  
    this.timeout = null;
    this.job = null;
    this.onShake = null;
  
    this.bip150 = null;
  }
docs: Represents a BIP151 input and output stream.
  Holds state for peer communication.
  @alias module:net.BIP151
  @constructor
  @param {Number} cipher
  @property {BIP151Stream} input
  @property {BIP151Stream} output
  @property {Boolean} initReceived
  @property {Boolean} ackReceived
  @property {Boolean} initSent
  @property {Boolean} ackSent
  @property {Object} timeout
  @property {Job} job
  @property {Boolean} completed
  @property {Boolean} handshake