import { TransportBroadcastChannel } from "https://deno.land/x/earthstar_streaming_rpc@v5.0.1/mod.ts";
A Transport that connects to other transports using the same BroadcastChannel channel in other tabs or windowns on the same machine. Many TransportBroadcastChannel can join the same channel to comunicate.
Constructors
new
TransportBroadcastChannel(opts: ITransportBroadcastChannelOpts<BagType>)Type Parameters
BagType extends FnsBag
Properties
_channel: BroadcastChannel
connections: WatchableSet<IConnection<BagType>>
methods: BagType
status: Watchable<TransportStatus>
Methods
_addOrGetConnection(otherDeviceId: string): IConnection<BagType>
close(): void
register()
Ping other transports on the same BroadcastChannel to make them create a connection to this one.