src/net/parser.js
function Parser(network) {
  if (!(this instanceof Parser))
    return new Parser(network);

  EventEmitter.call(this);

  this.network = Network.get(network);

  this.pending = [];
  this.total = 0;
  this.waiting = 24;
  this.header = null;
}
function Parser(network) {
  if (!(this instanceof Parser))
    return new Parser(network);

  EventEmitter.call(this);

  this.network = Network.get(network);

  this.pending = [];
  this.total = 0;
  this.waiting = 24;
  this.header = null;
}
function Parser ( network ) { if ( ! ( this instanceof Parser ) ) return new Parser ( network ) ; EventEmitter . call ( this ) ; this . network = Network . get ( network ) ; this . pending = [ ] ; this . total = 0 ; this . waiting = 24 ; this . header = null ; }
Protocol packet parser
@alias module:net.Parser
@constructor
@param {Network} network
@emits Parser#error
@emits Parser#packet
Protocol packet parser