bin/cli.js
function startRelay(portPair) {
  var devicePort = portPair[0]
    , relayPort = portPair[1];

  console.log('Starting relay from local port: %s -> device port: %s',
    relayPort, devicePort);

  new usbmux.Relay(devicePort, relayPort, {udid: argv.udid})
    .on('error', onErr)
    .on('warning', console.log.bind(console, 'Warning: device not found...'))
    .on('ready',      info.bind(this, 'Device ready: '))
    .on('attached',   info.bind(this, 'Device attached: '))
    .on('detached',   info.bind(this, 'Device detached: '))
    .on('connect',    info.bind(this, 'New connection to relay started.'))
    .on('disconnect', info.bind(this, 'Connection to relay closed.'))
    .on('close',      info.bind(this, 'Relay has closed.'));
}
function startRelay(portPair) {
  var devicePort = portPair[0]
    , relayPort = portPair[1];

  console.log('Starting relay from local port: %s -> device port: %s',
    relayPort, devicePort);

  new usbmux.Relay(devicePort, relayPort, {udid: argv.udid})
    .on('error', onErr)
    .on('warning', console.log.bind(console, 'Warning: device not found...'))
    .on('ready',      info.bind(this, 'Device ready: '))
    .on('attached',   info.bind(this, 'Device attached: '))
    .on('detached',   info.bind(this, 'Device detached: '))
    .on('connect',    info.bind(this, 'New connection to relay started.'))
    .on('disconnect', info.bind(this, 'Connection to relay closed.'))
    .on('close',      info.bind(this, 'Relay has closed.'));
}
function startRelay ( portPair ) { var devicePort = portPair [ 0 ] , relayPort = portPair [ 1 ] ; console . log ( 'Starting relay from local port: %s -> device port: %s' , relayPort , devicePort ) ; new usbmux . Relay ( devicePort , relayPort , { udid : argv . udid } ) . on ( 'error' , onErr ) . on ( 'warning' , console . log . bind ( console , 'Warning: device not found...' ) ) . on ( 'ready' , info . bind ( this , 'Device ready: ' ) ) . on ( 'attached' , info . bind ( this , 'Device attached: ' ) ) . on ( 'detached' , info . bind ( this , 'Device detached: ' ) ) . on ( 'connect' , info . bind ( this , 'New connection to relay started.' ) ) . on ( 'disconnect' , info . bind ( this , 'Connection to relay closed.' ) ) . on ( 'close' , info . bind ( this , 'Relay has closed.' ) ) ; }
Start a new relay from a pair of given ports
@param  {integer[]} portPair - [devicePort, relayPort]
Start a new relay from a pair of given ports