attachRealtimeWorker | attachRealtimeWorker(globalScope?: any): void | void | Worker-side message handler that attaches listeners to manage WebSocket and SSE connections. Call this inside your web worker file. |
WorkerWebSocketClient | constructor(worker: Worker | MessagePort, config: WebSocketClientConfig, destroyRef?: DestroyRef) | WorkerWebSocketClient | Client for managing WebSocket connections off-main-thread. Exposes status() signal and messages$ stream. |
WorkerSseClient | constructor(worker: Worker | MessagePort, config: SseClientConfig, destroyRef?: DestroyRef) | WorkerSseClient | Client for managing Server-Sent Events (EventSource) connections off-main-thread. Exposes status() signal and events$ stream. |
send | send(message: WebSocketMessage): void | void | Sends a JSON-serialized WebSocket message from the main thread via the worker. |
sendRaw | sendRaw(data: string): void | void | Sends a raw text WebSocket message from the main thread via the worker. |
request | request(type: string, data: any, opts?: WebSocketRequestOptions): Promise<any> | Promise<any> | Sends a request message and waits for a response message with matching correlationId. Rejects on timeout. |