EventSourceState

public enum EventSourceState : Sendable

The connection state of an EventSource instance.

Tracks the lifecycle of the Server-Sent Events connection from initial connection through active streaming to final closure.

  • Initial state when establishing connection to the server.

    Declaration

    Swift

    case connecting
  • Connection is established and ready to receive events.

    Declaration

    Swift

    case open
  • Connection is closed and no longer receiving events.

    Declaration

    Swift

    case closed