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

Method _endpoint

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

Source from the content-addressed store, hash-verified

55 }
56
57 _endpoint() {
58 // hack to detect if deployment or development environment
59 const protocol = location.protocol.startsWith('https') ? 'wss' : 'ws';
60 const webrtc = window.isRtcSupported ? '/webrtc' : '/fallback';
61 const url = protocol + '://' + location.host + location.pathname + 'server' + webrtc;
62 return url;
63 }
64
65 _disconnect() {
66 this.send({ type: 'disconnect' });

Callers 1

_connectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected