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

Method setupPeerConnection

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

Source from the content-addressed store, hash-verified

54 }
55
56 private setupPeerConnection(): void {
57 this.pc.ondatachannel = this.handleDataChannel.bind(this)
58 this.pc.onnegotiationneeded = this.reNegotiation.bind(this)
59 this.pc.onicecandidate = (e) => e.candidate && this.onICECandidate(e.candidate)
60 this.pc.onicecandidateerror = (e) => {
61 // console.warn(e)
62 // ingore
63 }
64 this.pc.onconnectionstatechange = this.handleConnectionStateChange.bind(this)
65 }
66
67 private handleDataChannel(e: RTCDataChannelEvent): void {
68 this.dc = e.channel

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected