function start(port, cb) {
    if (this.started) {
      this._log.warn("Warning: server already started on " + this.port);
      return;
    }
    try {
      this.server.start(port);
      let i = this.server.identity;
      this.port = i.primaryPort;
      this.baseURI = i.primaryScheme + "://" + i.primaryHost + ":" +
                     i.primaryPort + "/";
      this.started = true;
      if (cb) {
        cb();
      }
    } catch (ex) {
      _("==========================================");
      _("Got exception starting Sync HTTP server.");
      _("Error: " + Utils.exceptionStr(ex));
      _("Is there a process already listening on port " + port + "?");
      _("==========================================");
      do_throw(ex);
    }

  }
/**
   * Start the SyncServer's underlying HTTP server.
   *
   * @param port
   *        The numeric port on which to start. A falsy value implies the
   *        default, a randomly chosen port.
   * @param cb
   *        A callback function (of no arguments) which is invoked after
   *        startup.
   */
Start the SyncServer's underlying HTTP server.
@param port
The numeric port on which to start. A falsy value implies the
default, a randomly chosen port.
@param cb
A callback function (of no arguments) which is invoked after
startup.
Start the SyncServer ' s underlying HTTP server . @param port The numeric port on which to start . A falsy value implies the default a randomly chosen port . @param cb A callback function ( of no arguments ) which is invoked after startup .
function start(port, cb) {
    if (this.started) {
      this._log.warn("Warning: server already started on " + this.port);
      return;
    }
    try {
      this.server.start(port);
      let i = this.server.identity;
      this.port = i.primaryPort;
      this.baseURI = i.primaryScheme + "://" + i.primaryHost + ":" +
                     i.primaryPort + "/";
      this.started = true;
      if (cb) {
        cb();
      }
    } catch (ex) {
      _("==========================================");
      _("Got exception starting Sync HTTP server.");
      _("Error: " + Utils.exceptionStr(ex));
      _("Is there a process already listening on port " + port + "?");
      _("==========================================");
      do_throw(ex);
    }
  }
function start ( port , cb ) { if ( this . started ) { this . _log . warn ( "Warning: server already started on " + this . port ) ; return ; } try { this . server . start ( port ) ; let i = this . server . identity ; this . port = i . primaryPort ; this . baseURI = i . primaryScheme + "://" + i . primaryHost + ":" + i . primaryPort + "/" ; this . started = true ; if ( cb ) { cb ( ) ; } } catch ( ex ) { _ ( "==========================================" ) ; _ ( "Got exception starting Sync HTTP server." ) ; _ ( "Error: " + Utils . exceptionStr ( ex ) ) ; _ ( "Is there a process already listening on port " + port + "?" ) ; _ ( "==========================================" ) ; do_throw ( ex ) ; } }
Start the SyncServer's underlying HTTP server.
Start the SyncServer ' s underlying HTTP server .