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

Method _connect

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

Source from the content-addressed store, hash-verified

235 }
236
237 _connect(peerId, isCaller) {
238 if (!this._conn) this._openConnection(peerId, isCaller);
239
240 if (isCaller) {
241 this._openChannel();
242 } else {
243 this._conn.ondatachannel = e => this._onChannelOpened(e);
244 }
245 }
246
247 _openConnection(peerId, isCaller) {
248 this._isCaller = isCaller;

Callers 4

constructorMethod · 0.95
onServerMessageMethod · 0.95
_onChannelClosedMethod · 0.95
refreshMethod · 0.95

Calls 3

_openConnectionMethod · 0.95
_openChannelMethod · 0.95
_onChannelOpenedMethod · 0.95

Tested by

no test coverage detected