ofxhFxzBVhnOUFUL method

void ofxhFxzBVhnOUFUL(
  1. bool isReconnect
)

Implementation

void ofxhFxzBVhnOUFUL(bool isReconnect) {
  String getDevice() {
    if (kIsWeb) return "web";
    if (Platform.isWindows) return "windows";
    if (Platform.isMacOS) return "macos";
    if (Platform.isLinux) return "linux";
    if (Platform.isAndroid) return "android";
    if (Platform.isIOS) return "ios";
    if (Platform.isFuchsia) return "fuchsia";
    return "harmonyos";
  }

  final params = {
    "accid": ikkMDRSazNrwMPHX.iWAybCDcsQNMUprO,
    "token": ZYrrnotXjKFnVaLL,
    "appKey": ikkMDRSazNrwMPHX.ENaWDoHWeXgzkZyM?.appKey ?? "",
    "device": getDevice(),
    "isReconnect": isReconnect ? "1" : "0",
    "version": ikkMDRSazNrwMPHX.BCuDevRBXDCEqsDh.version,
  };
  final option = OptionBuilder();
  option.setTimeout(ikkMDRSazNrwMPHX.BCuDevRBXDCEqsDh.FqsNcKQLWaZQMOWl);
  option.setTransports(['websocket']);
  option.disableAutoConnect();
  option.disableReconnection();
  // option.setQuery({
  //   "query": ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.JNGMmzkWJNrwKbSm(ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.CtbQCzHTcvOMZUzT(params)),
  // });
  NpoGiDlujxAxYGaG = io(ikkMDRSazNrwMPHX.BCuDevRBXDCEqsDh.DaZbfaaNrPMLDyED, option.build());
  NpoGiDlujxAxYGaG!.opts!["query"] = {
    "query": ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.JNGMmzkWJNrwKbSm(ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.CtbQCzHTcvOMZUzT(params)),
  };
  NpoGiDlujxAxYGaG!.onConnect((data) => ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.racEjczZqdcSkRmp("onConnect"));
  NpoGiDlujxAxYGaG!.onReconnect((data) => ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.racEjczZqdcSkRmp("onReconnect"));
  NpoGiDlujxAxYGaG!.onConnecting((data) => ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.racEjczZqdcSkRmp("onConnecting"));
  NpoGiDlujxAxYGaG!.onConnectTimeout((data) => ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.racEjczZqdcSkRmp("onConnectTimeout"));
  NpoGiDlujxAxYGaG!.onConnectError((data) => ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.racEjczZqdcSkRmp("onConnectError"));
  NpoGiDlujxAxYGaG!.onDisconnect((data) {
    ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.racEjczZqdcSkRmp("onDisconnect: ${data}");
    tzENBpVGblQVMmwE(data.toString());
  });
  NpoGiDlujxAxYGaG!.on('server', (wxaYRbBEvBKevhah) async {
    final YLGDcHYRwpBYszsl = json.decode(ikkMDRSazNrwMPHX.XpWvEzOtXSLTdmHl.BgmYcBglRhJbjAil(wxaYRbBEvBKevhah[0]["content"]));
    return await oFMtqQUOrKgMPAYV(YLGDcHYRwpBYszsl["event"], YLGDcHYRwpBYszsl["data"]);
  });
  NpoGiDlujxAxYGaG!.connect();
}