@@ -5,8 +5,8 @@ import { ConnParams } from './conn.js'
55import { Server } from './server.js'
66import { DuplexConn } from './conn-duplex.js'
77
8- // BroadcastChannelIterable is a AsyncIterable wrapper for BroadcastChannel.
9- export class BroadcastChannelIterable < T > implements Duplex < T > {
8+ // BroadcastChannelDuplex is a AsyncIterable wrapper for BroadcastChannel.
9+ export class BroadcastChannelDuplex < T > implements Duplex < T > {
1010 // readChannel is the incoming broadcast channel
1111 public readonly readChannel : BroadcastChannel
1212 // writeChannel is the outgoing broadcast channel
@@ -55,12 +55,12 @@ export class BroadcastChannelIterable<T> implements Duplex<T> {
5555 }
5656}
5757
58- // newBroadcastChannelIterable constructs a BroadcastChannelIterable with a channel name.
59- export function newBroadcastChannelIterable < T > (
58+ // newBroadcastChannelDuplex constructs a BroadcastChannelDuplex with a channel name.
59+ export function newBroadcastChannelDuplex < T > (
6060 readName : string ,
6161 writeName : string
62- ) : BroadcastChannelIterable < T > {
63- return new BroadcastChannelIterable < T > (
62+ ) : BroadcastChannelDuplex < T > {
63+ return new BroadcastChannelDuplex < T > (
6464 new BroadcastChannel ( readName ) ,
6565 new BroadcastChannel ( writeName )
6666 )
@@ -71,15 +71,15 @@ export function newBroadcastChannelIterable<T>(
7171// expects Uint8Array objects over the BroadcastChannel.
7272export class BroadcastChannelConn extends DuplexConn {
7373 // broadcastChannel is the broadcast channel iterable
74- private broadcastChannel : BroadcastChannelIterable < Uint8Array >
74+ private broadcastChannel : BroadcastChannelDuplex < Uint8Array >
7575
7676 constructor (
7777 readChannel : BroadcastChannel ,
7878 writeChannel : BroadcastChannel ,
7979 server ?: Server ,
8080 connParams ?: ConnParams
8181 ) {
82- const broadcastChannel = new BroadcastChannelIterable < Uint8Array > (
82+ const broadcastChannel = new BroadcastChannelDuplex < Uint8Array > (
8383 readChannel ,
8484 writeChannel
8585 )
0 commit comments