MCPcopy
hub / github.com/SnapDrop/snapdrop / _openConnection

Method _openConnection

client/scripts/network.js:247–254  ·  view source on GitHub ↗
(peerId, isCaller)

Source from the content-addressed store, hash-verified

245 }
246
247 _openConnection(peerId, isCaller) {
248 this._isCaller = isCaller;
249 this._peerId = peerId;
250 this._conn = new RTCPeerConnection(RTCPeer.config);
251 this._conn.onicecandidate = e => this._onIceCandidate(e);
252 this._conn.onconnectionstatechange = e => this._onConnectionStateChange(e);
253 this._conn.oniceconnectionstatechange = e => this._onIceConnectionStateChange(e);
254 }
255
256 _openChannel() {
257 const channel = this._conn.createDataChannel('data-channel', {

Callers 1

_connectMethod · 0.95

Calls 3

_onIceCandidateMethod · 0.95

Tested by

no test coverage detected