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

Method _openChannel

client/scripts/network.js:256–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254 }
255
256 _openChannel() {
257 const channel = this._conn.createDataChannel('data-channel', {
258 ordered: true,
259 reliable: true // Obsolete. See https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/reliable
260 });
261 channel.onopen = e => this._onChannelOpened(e);
262 this._conn.createOffer().then(d => this._onDescription(d)).catch(e => this._onError(e));
263 }
264
265 _onDescription(description) {
266 // description.sdp = description.sdp.replace('b=AS:30', 'b=AS:1638400');

Callers 1

_connectMethod · 0.95

Calls 3

_onChannelOpenedMethod · 0.95
_onDescriptionMethod · 0.95
_onErrorMethod · 0.95

Tested by

no test coverage detected