dist/client/lance-gg.js
/**
     * Generates uri for connection.
     *
     * @api private
     */
Generates uri for connection.
@api private
Generates uri for connection . @api private
uri() {
      let query = this.query || {};
      const schema = this.opts.secure ? "https" : "http";
      let port = "";
      if (false !== this.opts.timestampRequests) {
        query[this.opts.timestampParam] = yeast_1();
      }
      if (!this.supportsBinary && !query.sid) {
        query.b64 = 1;
      }
      query = parseqs.encode(query);
      if (
        this.opts.port &&
        (("https" === schema && Number(this.opts.port) !== 443) ||
          ("http" === schema && Number(this.opts.port) !== 80))
      ) {
        port = ":" + this.opts.port;
      }
      if (query.length) {
        query = "?" + query;
      }
      const ipv6 = this.opts.hostname.indexOf(":") !== -1;
      return (
        schema +
        "://" +
        (ipv6 ? "[" + this.opts.hostname + "]" : this.opts.hostname) +
        port +
        this.opts.path +
        query
      );
    }
uri ( ) { let query = this . query || { } ; const schema = this . opts . secure ? "https" : "http" ; let port = "" ; if ( false !== this . opts . timestampRequests ) { query [ this . opts . timestampParam ] = yeast_1 ( ) ; } if ( ! this . supportsBinary && ! query . sid ) { query . b64 = 1 ; } query = parseqs . encode ( query ) ; if ( this . opts . port && ( ( "https" === schema && Number ( this . opts . port ) !== 443 ) || ( "http" === schema && Number ( this . opts . port ) !== 80 ) ) ) { port = ":" + this . opts . port ; } if ( query . length ) { query = "?" + query ; } const ipv6 = this . opts . hostname . indexOf ( ":" ) !== - 1 ; return ( schema + "://" + ( ipv6 ? "[" + this . opts . hostname + "]" : this . opts . hostname ) + port + this . opts . path + query ) ; }
Generates uri for connection.
Generates uri for connection .
// cache busting is forced // avoid port if default for schema // prepend ? to query