decord/source/modules/rpc/transports/BaseSocket.tsx

47 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8799
// Function ID: 8800
2026-07-29 08:29:29 +00:00
// Name: checkRpcVersion
2026-08-24 06:08:38 +00:00
// Dependencies: [676, 12, 8789, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 8799 (checkRpcVersion)
import set from "set" /* 2 */;
import applyDefault from "apply" /* 12 */;
import prototypeDefault from "prototype" /* 8789 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ RPC_VERSION: obj1, RPCCloseCodes: c3 } = ME);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/rpc/transports/BaseSocket.tsx");
2026-07-29 08:29:29 +00:00
class BaseSocket {
constructor(arg0, arg1, arg2) {
obj = Object.create(new.target.prototype);
obj2 = require("apply");
obj[0] = obj2.uniqueId();
obj = { authing: false, scopes: [], accessToken: null, expires: null };
date = new Date(0);
obj[3] = date;
obj[1] = obj;
obj[2] = { id: null, name: null, icon: null };
abortController = new AbortController();
obj[3] = abortController;
2026-08-06 08:05:19 +00:00
obj.source = global;
2026-07-29 08:29:29 +00:00
obj.version = require;
obj.encoding = importDefault;
checkRpcVersionResult = obj.checkRpcVersion(require);
return obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
2026-08-06 08:05:19 +00:00
const prototype = BaseSocket.prototype;
prototype["checkRpcVersion"] = function checkRpcVersion(version) {
2026-08-24 06:08:38 +00:00
let tmp2 = prototypeDefault;
2026-07-29 08:29:29 +00:00
tmp2 = new tmp2({ closeCode: constants.INVALID_VERSION }, "Invalid Version: " + version);
throw tmp2;
};
2026-08-06 08:05:19 +00:00
Object.defineProperty(prototype, "transport", {
get: function transport(arg0) {
return this.source.type;
},
set: undefined
});
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default BaseSocket;