sse => ws

This commit is contained in:
Darius
2026-02-06 11:08:26 +01:00
parent 60bcd23f5b
commit ad9cf36e98
14 changed files with 136 additions and 555 deletions

16
dist/ws.d.ts vendored Normal file
View File

@@ -0,0 +1,16 @@
export type WsEvent = {
type: string;
data?: unknown;
};
export type WsClientChangeCallback = (clients: number) => void;
export declare class WsService {
private clients;
private listeners;
onClientChange(callback: WsClientChangeCallback): () => void;
private emitClientChange;
addClient(ws: WebSocket): void;
removeClient(ws: WebSocket): void;
broadcast(message: WsEvent): void;
getClientCount(): number;
}
//# sourceMappingURL=ws.d.ts.map