AngularTS
    Preparing search index...

    Interface SseConfig

    SSE-specific configuration

    interface SseConfig {
        eventTypes?: string[];
        headers?: Record<string, string>;
        heartbeatTimeout?: number;
        maxRetries?: number;
        onClose?: (event: CloseEvent) => void;
        onError?: (err: Event) => void;
        onEvent?: (message: ConnectionEvent) => void;
        onMessage?: (data: unknown, event: Event | MessageEvent<any>) => void;
        onOpen?: (event: Event) => void;
        onReconnect?: (attempt: number) => void;
        params?: Record<string, unknown>;
        retryDelay?: number;
        transformMessage?: (data: string) => unknown;
        withCredentials?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    eventTypes?: string[]

    Additional EventSource event names to subscribe to

    headers?: Record<string, string>

    Custom headers (EventSource doesn't natively support headers)

    heartbeatTimeout?: number

    Timeout in milliseconds to detect heartbeat inactivity

    maxRetries?: number

    Maximum number of reconnect attempts

    onClose?: (event: CloseEvent) => void

    Called when a WebSocket connection closes

    onError?: (err: Event) => void

    Called when an error occurs

    onEvent?: (message: ConnectionEvent) => void

    Called with every registered connection message, including custom SSE event types

    onMessage?: (data: unknown, event: Event | MessageEvent<any>) => void

    Called when a message is received

    onOpen?: (event: Event) => void

    Called when the connection opens

    onReconnect?: (attempt: number) => void

    Called when a reconnect attempt happens

    params?: Record<string, unknown>

    Optional query parameters appended to the URL

    retryDelay?: number

    Delay between reconnect attempts in milliseconds

    transformMessage?: (data: string) => unknown

    Function to transform incoming messages

    withCredentials?: boolean

    Include cookies/credentials when connecting