_ioSetup() {
    if (lookup2 === void 0) {
      log("error", "Uib:ioSetup", "Socket.IO client not loaded, Node-RED comms will not work")();
      return false;
    }
    if (this._socket) {
      log("trace", "Uib:ioSetup", "Removing listeners in preparation for redoing Socket.IO connections")();
      if (__privateGet(this, _timerid)) {
        window.clearTimeout(__privateGet(this, _timerid));
        __privateSet(this, _timerid, null);
      }
      this._socket.close();
      this._socket.offAny();
      this._socket = void 0;
      this.set("ioConnected", false);
    }
    this.socketOptions.path = this.ioPath;
    log("trace", "Uib:ioSetup", "About to create IO object. Transports: [".concat(this.socketOptions.transports.join(", "), "]"))();
    this._socket = lookup2(this.ioNamespace, this.socketOptions);
    this._connectGlobal();
    this._socket.on("connect", this._onConnect.bind(this));
    this._socket.on(this._ioChannels.server, this._stdMsgFromServer.bind(this));
    this._socket.on(this._ioChannels.control, this._ctrlMsgFromServer.bind(this));
    this._socket.on("disconnect", this._onDisconnect.bind(this));
    this._socket.on("connect_error", (err) => {
      if (navigator.onLine === false) return;
      log("error", "Uib:ioSetup:connect_error", "\u274C Socket.IO Connect Error. Reason: ".concat(err.message), err)();
      this.set("ioConnected", false);
      this.set("socketError", err);
      this._dispatchCustomEvent("uibuilder:socket:disconnected", err);
    });
    this._socket.on("error", (err) => {
      log("error", "Uib:ioSetup:error", "\u274C Socket.IO Error. Reason: ".concat(err.message), err)();
      this.set("ioConnected", false);
      this.set("socketError", err);
      this._dispatchCustomEvent("uibuilder:socket:disconnected", err);
    });
    this._socket.io.engine.on("connection_error", (err) => {
      log(
        "error",
        "Uib:ioSetup:io:engine:connection_error",
        err.code,
        // 3
        err.message,
        // "Bad request"
        err.context
        // { name: 'TRANSPORT_MISMATCH', transport: 'websocket', previousTransport: 'polling' }
      )();
    });
    this._checkConnect();
    return true;
  }
Setup Socket.io
since v2.0.0-beta2 Moved to a function and called by the user (uibuilder.start()) so that namespace & path can be passed manually if needed
@returns {boolean} Attaches socket.io manager to self._socket and updates self.ioNamespace & self.ioPath as needed
@private