Connections & protocols

Server-sent events

Server-sent events are a browser-supported mechanism for receiving a stream of text events from a server over HTTP, commonly through the EventSource API.

Also found under: SSE, EventSource

How it works

SSE carries updates from server to client; clients use separate requests when they need to send application actions back. It can suit feeds and status streams. Choosing between SSE and WebSockets depends on the protocol, client environment and communication needs, not on a universal speed ranking.

In a Pubb integration

Pubb's documented subscriber transport is WebSocket. An SSE endpoint is a separate integration choice and should not be assumed to exist at Pubb's socket URL.

Connect a client

A practical example

A custom job-progress endpoint could stream status lines using SSE. A Pubb integration instead subscribes to a channel and receives progress events through WebSockets.