code: function DataProtocol (id, socket) {
    this.id = id;
    this._socket = socket;
    this._buffer = new Buffer(0);
    this._debug = utils.debug('protocol:' + id);
    var me = this;
  
    socket.on('data', function (data) {
      me._onData(data);
    });
  
    this._midCounter = 0;
    this._msgCallback = {};
  
    this._debug('create');
  }
docs: DataProtocol
  
  @param {String} id
  @param {Object} socket