MCPcopy Create free account
hub / github.com/ShouChenICU/FastSend / setupDataChannel

Method setupDataChannel

app/utils/PeerDataChannel.ts:77–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 }
76
77 private setupDataChannel(): void {
78 if (!this.dc) return
79 this.dc.bufferedAmountLowThreshold = 0
80 this.dc.onmessage = (e) => this.eventQueue.enqueue(e.data)
81 this.dc.onopen = () => this.onOpen()
82 }
83
84 private handleConnectionStateChange(): void {
85 if (['closed', 'disconnected', 'failed'].includes(this.pc.connectionState)) {

Callers 2

handleDataChannelMethod · 0.95
initializeDataChannelMethod · 0.95

Calls 1

enqueueMethod · 0.80

Tested by

no test coverage detected