@trap_stevo/filetide
Version:
Revolutionizing real-time file transfer with seamless, instant communication across any device. Deliver files instantly, regardless of platform, and experience unparalleled speed and control in managing transfers. Elevate your file-sharing capabilities wi
40 lines (39 loc) • 713 B
JavaScript
class FileMessagerConfigManager {
static getServerOptions({
maxHttpBufferSize = 1e9,
pingTimeout = 180000,
pingInterval = 60000,
useHTTPS = false,
corsOrigin = "*",
useCors = true,
port = 9269,
...rest
} = {}) {
return {
useHTTPS,
useCors,
port,
socketOptions: {
maxHttpBufferSize,
pingInterval,
pingTimeout,
cors: {
origin: corsOrigin,
methods: ["GET", "POST"]
}
},
...rest
};
}
static getClientOptions({
serverUrl = "http://localhost:3000"
} = {}) {
return {
url: serverUrl
};
}
}
module.exports = {
FileMessagerConfigManager
};
;