Effection Logo

interface Channelthefrontside/effection

interface Channel<T, TClose> extends Stream<T, TClose>

A broadcast channel that multiple consumers can subscribe to the via the same Stream, and messages sent to the channel are received by all consumers. The channel is not buffered, so if there are no consumers, the message is dropped.

Type Parameters

T

TClose

Methods

send(message: T): Operation<void>

Send a message to all subscribers of this Channel

close(value: TClose): Operation<void>

End every subscription to this Channel