@tldraw/sync-core
Version:
tldraw infinite canvas SDK (multiplayer sync).
39 lines (38 loc) • 1.65 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var RoomSession_exports = {};
__export(RoomSession_exports, {
RoomSessionState: () => RoomSessionState,
SESSION_IDLE_TIMEOUT: () => SESSION_IDLE_TIMEOUT,
SESSION_REMOVAL_WAIT_TIME: () => SESSION_REMOVAL_WAIT_TIME,
SESSION_START_WAIT_TIME: () => SESSION_START_WAIT_TIME
});
module.exports = __toCommonJS(RoomSession_exports);
const RoomSessionState = {
/** Session is waiting for the initial connect message from the client */
AwaitingConnectMessage: "awaiting-connect-message",
/** Session is disconnected but waiting for final cleanup before removal */
AwaitingRemoval: "awaiting-removal",
/** Session is fully connected and actively synchronizing */
Connected: "connected"
};
const SESSION_START_WAIT_TIME = 1e4;
const SESSION_REMOVAL_WAIT_TIME = 5e3;
const SESSION_IDLE_TIMEOUT = 2e4;
//# sourceMappingURL=RoomSession.js.map