This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
// Metro module 10636 (f10637).
import { RPCCloseCodes, RPC_VERSION } from "../../../Constants";
import Module12 from "../../../_bundle/Module12";
import RPCError from "../RPCError";
class BaseSocket {
constructor(a0, a1, a2) {
const r16 = {
__proto__: new.target.prototype,
id: Module12.uniqueId(),
authorization: null,
application: null,
abortController: null
};
r16.authorization = {
authing: false,
scopes: [],
accessToken: null,
expires: new Date(0)
};
r16.application = {
id: null,
name: null,
icon: null
};
r16.abortController = new AbortController();
r16.transport = a0;
r16.version = a1;
r16.encoding = a2;
r16.checkRpcVersion(a1);
return r16;
}
checkRpcVersion(a0) {
if (a0 != null && !(a0 > RPC_VERSION) && !(a0 < 1)) {
return void 0;
}
throw new RPCError({
closeCode: RPCCloseCodes.INVALID_VERSION
}, `Invalid Version: ${a0}`);
}
}
export default BaseSocket;