ServerSentEventsService

Manages Server-Sent Events (SSE) connections. Supports typed message streams, custom event types, and multiple concurrent connections identified by URL.

TypeScriptexample.ts
import { ServerSentEventsService } from '@angular-helpers/browser-web-apis'

# Methods

MethodSignatureReturnsDescription
connectconnect(url: string, config: SSEConfig): Observable<SSEMessage<T>>Observable<SSEMessage<T>>Public method connect.
disconnectdisconnect(url: string): voidvoidPublic method disconnect.
disconnectAlldisconnectAll(): voidvoidPublic method disconnectAll.
getStategetState(url: string): SSEConnectionStateSSEConnectionStatePublic method getState.
getActiveConnectionsgetActiveConnections(): string[]string[]Public method getActiveConnections.
LCP N/A
CLS N/A
INP N/A