Skip to content

Server-Sent Events (SSE) support #3

@EdmondDantes

Description

@EdmondDantes

Implement Server-Sent Events per the WHATWG / RFC 8895 spec.

Scope

  • text/event-stream response mode with chunked / HTTP-2 framing.
  • Public PHP API for emitting events: id, event, data, retry fields.
  • Automatic flush on each event; integration with the response writer's backpressure.
  • Heartbeat / keep-alive comments to prevent intermediary timeouts.
  • Last-Event-ID resume header surfaced on the request.
  • Works over HTTP/1.1, HTTP/2, and HTTP/3.
  • PHPT tests covering reconnection, ID propagation, and backpressure.

Acceptance

  • Browser EventSource clients connect and receive events end-to-end.
  • No buffering between PHP send() and the wire under load.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions