Skip to content

JS: EventSource / Server-Sent Events over the existing progressive HTTP fetch path #344

Description

@mplsllc

Status

The old #127 umbrella grouped EventSource with WebSockets as a permanent won't-fix. A later architecture audit corrected that assumption: MacSurf's fetchers already deliver response data progressively and the JS fetch arena can receive repeated data callbacks. The main known blocker is that the ordinary no-progress timeout would terminate a legitimately idle SSE stream.

EventSource is therefore tractable independently of WebSockets and deserves its own issue.

V1 scope

  • new EventSource(url) using the existing HTTP/HTTPS fetch path.
  • text/event-stream line parser for data, event, id, and retry fields.
  • dispatch open, named/default message events, and error.
  • retain/reconnect using last-event-id and retry delay.
  • bypass or adapt the normal short no-progress timeout for an established SSE stream without weakening ordinary request timeout behavior.
  • close() and navigation/realm teardown release the connection.

Acceptance

A controlled endpoint sends several events with an idle gap longer than the normal request timeout; MacSurf stays connected, delivers the events once/in order, reconnects with last-event-id after a forced disconnect, and closes cleanly on navigation. Hardware verify on the G3.

WebSockets remain separately not planned unless the transport architecture changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: js-engineDuktape, ES5 evaluator, JS bindingsarea: networkingOpen Transport, HTTP, proxyenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions