sse => ws
This commit is contained in:
16
dist/ws.d.ts
vendored
Normal file
16
dist/ws.d.ts
vendored
Normal 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
|
||||
Reference in New Issue
Block a user