decord/source/module_13850.js

46 lines
1.1 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13850
// Function ID: 13851
2026-08-14 17:33:39 +00:00
// Dependencies: []
2026-08-13 07:00:46 +00:00
2026-08-24 06:08:38 +00:00
// Module 13850
2026-08-14 17:33:39 +00:00
arg5.default = (createSocket) => {
({ host, port } = createSocket);
if (null != createSocket.createSocket) {
let tmp7 = typeof host === "string";
if (typeof host === "string") {
tmp7 = host;
}
if (tmp7) {
tmp7 = "" !== host;
}
if (tmp7) {
let tmp13 = typeof port === "number";
if (typeof port === "number") {
tmp13 = port >= 1;
}
if (tmp13) {
tmp13 = port <= 65535;
}
if (tmp13) {
if (typeof tmp !== "function") {
const _Error4 = Error;
2026-08-24 06:08:38 +00:00
error = new Error("invalid onCommand handler");
2026-08-14 17:33:39 +00:00
throw error;
}
} else {
const _Error3 = Error;
const error1 = new Error("invalid port");
throw error1;
2026-08-13 07:00:46 +00:00
}
2026-08-14 17:33:39 +00:00
} else {
const _Error2 = Error;
const error2 = new Error("invalid host");
throw error2;
2026-08-13 07:00:46 +00:00
}
2026-08-14 17:33:39 +00:00
} else {
const _Error = Error;
const error3 = new Error("invalid createSocket function");
throw error3;
}
2026-08-13 07:00:46 +00:00
};