interface SseChannel
Since 0.1.0

A named broadcast channel within the SSE hub.

Multiple connections may subscribe to a channel; publishing a message to the channel delivers it to every open member. Closed members are silently skipped during broadcast.

Properties

readonly
size: number

Number of currently open connections in this channel.

Methods

add(conn: ISseConnection): void

Adds a connection to this channel's membership.

Removes a connection from this channel's membership.

publish(msg: SseMessage): void

Publishes a message to every open member of this channel, skipping any connection whose ISseConnection.isOpen is false.

Usage

import { type SseChannel } from "common/src/index.ts";