lib/client.js
function execute(cmd, args, cb) {
  if(typeof args === 'function') {
    cb = args;
    args = null;
  }
  var arr = [cmd].concat(args || []);
  if(typeof cb === 'function') {
    this.once('reply', cb);
  }

  // sending over tcp
  if(this.tcp) {
    this.encoder.write(arr);
  // connected to a server within this process
  }else{
    this.socket.write(arr);
  }
}
function execute(cmd, args, cb) {
  if(typeof args === 'function') {
    cb = args;
    args = null;
  }
  var arr = [cmd].concat(args || []);
  if(typeof cb === 'function') {
    this.once('reply', cb);
  }

  // sending over tcp
  if(this.tcp) {
    this.encoder.write(arr);
  // connected to a server within this process
  }else{
    this.socket.write(arr);
  }
}
function execute ( cmd , args , cb ) { if ( typeof args === 'function' ) { cb = args ; args = null ; } var arr = [ cmd ] . concat ( args || [ ] ) ; if ( typeof cb === 'function' ) { this . once ( 'reply' , cb ) ; } // sending over tcp if ( this . tcp ) { this . encoder . write ( arr ) ; // connected to a server within this process } else { this . socket . write ( arr ) ; } }
Execute a named command with arguments.
Execute a named command with arguments .