Effection Logo

interface Channel

thefrontside/effection

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

A broadcast channel that multiple consumers can subscribe to the via the same https://effection-www-pggsafb7y58a.deno.dev/api/v4/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): https://effection-www-pggsafb7y58a.deno.dev/api/v4/Operation&lt;void>

Send a message to all subscribers of this https://effection-www-pggsafb7y58a.deno.dev/api/v4/Channel

close(value: TClose): https://effection-www-pggsafb7y58a.deno.dev/api/v4/Operation&lt;void>

End every subscription to this https://effection-www-pggsafb7y58a.deno.dev/api/v4/Channel