pqfdpoaUthVJForo method
void
pqfdpoaUthVJForo(
- bool isReconnect
)
Implementation
void pqfdpoaUthVJForo(bool isReconnect) {
String getDevice() {
if (kIsWeb) return "web";
if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) return "pc";
if (Platform.isAndroid) return "android";
if (Platform.isIOS) return "ios";
return "";
}
final params = {
"accid": ZFLObPsphPxMTkby.pXCwbjEEdyIuaOLd,
"token": PmRpwwMESPOfynsF,
"appKey": ZFLObPsphPxMTkby.wiyKdMNiWryRtbKu?.appKey ?? "",
"device": getDevice(),
"isReconnect": isReconnect ? "1" : "0",
};
final option = OptionBuilder();
option.setTimeout(ZFLObPsphPxMTkby.udUYZZYVhyhSvfjn.QFxQKJyaAqqlmTiy);
option.setTransports(['websocket']);
option.disableAutoConnect();
option.disableReconnection();
option.setQuery(params);
SLsSvSiCuIwJrNvO = io(ZFLObPsphPxMTkby.udUYZZYVhyhSvfjn.CxwiZmYErRJhpPij, option.build());
SLsSvSiCuIwJrNvO!.onConnect((data) => ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.PWrYGCYWdtzicinD("onConnect"));
SLsSvSiCuIwJrNvO!.onReconnect((data) => ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.PWrYGCYWdtzicinD("onReconnect"));
SLsSvSiCuIwJrNvO!.onConnecting((data) => ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.PWrYGCYWdtzicinD("onConnecting"));
SLsSvSiCuIwJrNvO!.onConnectTimeout((data) => ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.PWrYGCYWdtzicinD("onConnectTimeout"));
SLsSvSiCuIwJrNvO!.onConnectError((data) => ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.PWrYGCYWdtzicinD("onConnectError"));
SLsSvSiCuIwJrNvO!.onDisconnect((data) {
ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.PWrYGCYWdtzicinD("onDisconnect: ${data}");
SBETPLbQweNtODAQ(data.toString());
});
SLsSvSiCuIwJrNvO!.on('server', (data_server) async => await zQMxoUabOfHXdUvi(data_server["event"], data_server["data"]));
SLsSvSiCuIwJrNvO!.connect();
}