MCPcopy Create free account
hub / github.com/ShareDropio/sharedrop / init

Function init

app/models/peer.js:12–33  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

10 transfer: null,
11
12 init(...args) {
13 this._super(args);
14
15 const initialPeerState = EmberObject.create({
16 id: null,
17 connection: null,
18 // State of data channel connection. Possible states:
19 // - disconnected
20 // - connecting
21 // - connected
22 state: 'disconnected',
23 });
24 const initialTransferState = EmberObject.create({
25 file: null,
26 info: null,
27 sendingProgress: 0,
28 receivingProgress: 0,
29 });
30
31 this.set('peer', initialPeerState);
32 this.set('transfer', initialTransferState);
33 },
34
35 // Used to display popovers. Possible states:
36 // - idle

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected