8 lines
434 B
JavaScript
8 lines
434 B
JavaScript
|
|
// In-memory live state shared between the HTTP routes and the WebSocket signaling layer.
|
||
|
|
// NOTE (roadmap): this is the piece that must move to Redis to run multiple instances.
|
||
|
|
module.exports = {
|
||
|
|
onlineAgents: new Map(), // machineId -> { ws, machine }
|
||
|
|
liveSessions: new Map(), // sessionId -> { agentWs, viewerWs, machine, user }
|
||
|
|
pendingShares: new Map(), // code -> { sharerWs, sessionId } (no-install ad-hoc shares)
|
||
|
|
};
|