remote/index.js
function DriverService(executable, options) {

  /** @private {string} */
  this.executable_ = executable;

  /** @private {boolean} */
  this.loopbackOnly_ = !!options.loopback;

  /** @private {(number|!webdriver.promise.Promise.<number>)} */
  this.port_ = options.port;

  /**
   * @private {!(Array.<string>|webdriver.promise.Promise.<!Array.<string>>)}
   */
  this.args_ = options.args;

  /** @private {string} */
  this.path_ = options.path || '/';

  /** @private {!Object.<string, string>} */
  this.env_ = options.env || process.env;

  /** @private {(string|!Array.<string|number|!Stream|null|undefined>)} */
  this.stdio_ = options.stdio || 'ignore';

  /**
   * A promise for the managed subprocess, or null if the server has not been
   * started yet. This promise will never be rejected.
   * @private {promise.Promise.<!exec.Command>}
   */
  this.command_ = null;

  /**
   * Promise that resolves to the server's address or null if the server has
   * not been started. This promise will be rejected if the server terminates
   * before it starts accepting WebDriver requests.
   * @private {promise.Promise.<string>}
   */
  this.address_ = null;
}
function DriverService(executable, options) {

  /** @private {string} */
  this.executable_ = executable;

  /** @private {boolean} */
  this.loopbackOnly_ = !!options.loopback;

  /** @private {(number|!webdriver.promise.Promise.<number>)} */
  this.port_ = options.port;

  /**
   * @private {!(Array.<string>|webdriver.promise.Promise.<!Array.<string>>)}
   */
  this.args_ = options.args;

  /** @private {string} */
  this.path_ = options.path || '/';

  /** @private {!Object.<string, string>} */
  this.env_ = options.env || process.env;

  /** @private {(string|!Array.<string|number|!Stream|null|undefined>)} */
  this.stdio_ = options.stdio || 'ignore';

  /**
   * A promise for the managed subprocess, or null if the server has not been
   * started yet. This promise will never be rejected.
   * @private {promise.Promise.<!exec.Command>}
   */
  this.command_ = null;

  /**
   * Promise that resolves to the server's address or null if the server has
   * not been started. This promise will be rejected if the server terminates
   * before it starts accepting WebDriver requests.
   * @private {promise.Promise.<string>}
   */
  this.address_ = null;
}
function DriverService ( executable , options ) { /** @private {string} */ this . executable_ = executable ; /** @private {boolean} */ this . loopbackOnly_ = ! ! options . loopback ; /** @private {(number|!webdriver.promise.Promise.<number>)} */ this . port_ = options . port ; /**
   * @private {!(Array.<string>|webdriver.promise.Promise.<!Array.<string>>)}
   */ this . args_ = options . args ; /** @private {string} */ this . path_ = options . path || '/' ; /** @private {!Object.<string, string>} */ this . env_ = options . env || process . env ; /** @private {(string|!Array.<string|number|!Stream|null|undefined>)} */ this . stdio_ = options . stdio || 'ignore' ; /**
   * A promise for the managed subprocess, or null if the server has not been
   * started yet. This promise will never be rejected.
   * @private {promise.Promise.<!exec.Command>}
   */ this . command_ = null ; /**
   * Promise that resolves to the server's address or null if the server has
   * not been started. This promise will be rejected if the server terminates
   * before it starts accepting WebDriver requests.
   * @private {promise.Promise.<string>}
   */ this . address_ = null ; }
Manages the life and death of a native executable WebDriver server.

<p>It is expected that the driver server implements the
<a href="http://code.google.com/p/selenium/wiki/JsonWireProtocol">WebDriver
Wire Protocol</a>. Furthermore, the managed server should support multiple
concurrent sessions, so that this class may be reused for multiple clients.

@param {string} executable Path to the executable to run.
@param {!ServiceOptions} options Configuration options for the service.
@constructor
Manages the life and death of a native executable WebDriver server .