lib/usbmux.js
function Relay(devicePort, relayPort, opts) {
  if (!(this instanceof Relay)) return new Relay(arguments);

  this._devicePort = devicePort;
  this._relayPort = relayPort;

  opts = opts || {};
  this._udid = opts.udid;

  this._startListener(opts.timeout);
  this._startServer();
}
function Relay(devicePort, relayPort, opts) {
  if (!(this instanceof Relay)) return new Relay(arguments);

  this._devicePort = devicePort;
  this._relayPort = relayPort;

  opts = opts || {};
  this._udid = opts.udid;

  this._startListener(opts.timeout);
  this._startServer();
}
function Relay ( devicePort , relayPort , opts ) { if ( ! ( this instanceof Relay ) ) return new Relay ( arguments ) ; this . _devicePort = devicePort ; this . _relayPort = relayPort ; opts = opts || { } ; this . _udid = opts . udid ; this . _startListener ( opts . timeout ) ; this . _startServer ( ) ; }
Creates a new tcp relay to a port on connected usb device

@constructor
@param {integer} devicePort          - Port to connect to on device
@param {integer} relayPort           - Local port that will listen as relay
@param {object}  [opts]              - Options
@param {integer} [opts.timeout=1000] - Search time (ms) before warning
@param {string}  [opts.udid]         - UDID of specific device to connect to

@public
Creates a new tcp relay to a port on connected usb device