lib/connection.js
function _process(buf) {
  var b = buf[0], cli, cmd, req, res;

  //console.dir('' + buf);

  // does it look like a RESP message
  if(b === STR
    || b === ERR
    || b === INT
    || b === BST
    || b === ARR
    // already buffered some data, chunked request
    || (this.decoder.isBuffered())) {
    //console.dir('writing buffer to decoder..');
    this.decoder.write(buf);
  }else{
    try {
      cli = itr.interpret(buf.toString());
    }catch(e) {
      // ignore empty command strings
      return;
    }
    cmd = (cli.shift() + '').toLowerCase();
    req = new Request(this, cmd, cli);
    res = new Response(this);
    this.emit('command', req, res);
  }
}
function _process(buf) {
  var b = buf[0], cli, cmd, req, res;

  //console.dir('' + buf);

  // does it look like a RESP message
  if(b === STR
    || b === ERR
    || b === INT
    || b === BST
    || b === ARR
    // already buffered some data, chunked request
    || (this.decoder.isBuffered())) {
    //console.dir('writing buffer to decoder..');
    this.decoder.write(buf);
  }else{
    try {
      cli = itr.interpret(buf.toString());
    }catch(e) {
      // ignore empty command strings
      return;
    }
    cmd = (cli.shift() + '').toLowerCase();
    req = new Request(this, cmd, cli);
    res = new Response(this);
    this.emit('command', req, res);
  }
}
function _process ( buf ) { var b = buf [ 0 ] , cli , cmd , req , res ; //console.dir('' + buf); // does it look like a RESP message if ( b === STR || b === ERR || b === INT || b === BST || b === ARR // already buffered some data, chunked request || ( this . decoder . isBuffered ( ) ) ) { //console.dir('writing buffer to decoder..'); this . decoder . write ( buf ) ; } else { try { cli = itr . interpret ( buf . toString ( ) ) ; } catch ( e ) { // ignore empty command strings return ; } cmd = ( cli . shift ( ) + '' ) . toLowerCase ( ) ; req = new Request ( this , cmd , cli ) ; res = new Response ( this ) ; this . emit ( 'command' , req , res ) ; } }
Process incoming data and respond accordingly.

@param buf The incoming buffer.
Process incoming data and respond accordingly .