Skip to content

Commit 31e8138

Browse files
committed
refactor: rename BroadcastChannelIterable to BroadcastChannelIterable
Signed-off-by: Christian Stewart <[email protected]>
1 parent 6e35c5d commit 31e8138

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "starpc",
3-
"version": "0.4.8",
3+
"version": "0.4.9",
44
"description": "Streaming protobuf RPC service protocol over any two-way channel.",
55
"license": "MIT",
66
"author": {

srpc/broadcast-channel.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { ConnParams } from './conn.js'
55
import { Server } from './server.js'
66
import { 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.
7272
export 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
)

srpc/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export { Handler, InvokeFn, createHandler, createInvokeFn } from './handler.js'
66
export { Packet, CallStart, CallData } from './rpcproto.pb.js'
77
export { Mux, createMux } from './mux.js'
88
export {
9-
BroadcastChannelIterable,
10-
newBroadcastChannelIterable,
9+
BroadcastChannelDuplex,
10+
newBroadcastChannelDuplex,
1111
BroadcastChannelConn,
1212
} from './broadcast-channel.js'
1313
export {

0 commit comments

Comments
 (0)