ReadonlychannelNumber of channels with members. Drops when a last member leaves and becomes zero when shutdown clears the registry.
ReadonlyconnectionCurrent number of open connections.
Returns a reusable named channel handle. Membership is allocated on add and reclaimed when the last member leaves. Held handles resolve members by name and remain usable after reclamation.
Channel name
The named channel
Opens a new SSE connection for the given request context.
Constructs a ReadableStream, captures its controller, sets the SSE
response headers on the context's response builder, calls
ctx.response.stream(rs) to obtain the HandlerResult, and returns a
connection the handler can use to send messages after the handler returns.
The current request context
The SSE connection with its result
Returns the named channel when it has members, without creating a handle or membership entry. Empty channels return undefined.
Channel name
The channel, or undefined when it has no members
Service contract for the SSE hub — registered by the SsePlugin under
CAPABILITIES.SSE.Example
Since
0.1.0