feat: session event subscriptions and dispatch hot path (PUT-1666) (#3675)

This commit is contained in:
Daniel Salazar
2026-09-02 09:01:22 -07:00
committed by GitHub
parent 92e1b40361
commit b07d2e109f
18 changed files with 3103 additions and 3 deletions
@@ -632,6 +632,11 @@ export class SocketService extends PuterService {
// connection gives its slots back the same way a closed one does.
void this.#admitConnection(socket, actor, userId);
// Subscription verbs and the disconnect reaping that goes with
// them. Off unless events are enabled, in which case the verbs
// answer with `events_disabled` rather than going unanswered.
this.services.events.attachSocket(socket, actor);
// Peer-echo: one tab notifies others that trash is empty.
socket.on('trash.is_empty', (msg: unknown) => {
void this.#allowSocketEvent(userId, 'trash.is_empty').then(