The strategy an EventSource uses to decide how long to wait before each reconnection attempt. It is injected so a data source can drive reconnection timing from its own retry state rather than the transport's built-in backoff. The nowMs arguments are the transport's wall clock; an implementation that keeps its own clock may ignore them.

Hierarchy

  • EventSourceRetryDelayStrategy

Methods

  • Returns the delay, in milliseconds, before the next reconnection.

    Parameters

    • nowMs: number

    Returns number

  • Applies a server-directed base delay, in milliseconds.

    Parameters

    • baseDelayMs: number

    Returns void

  • Records that the connection is currently healthy.

    Parameters

    • nowMs: number

    Returns void

Generated using TypeDoc