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

Function _onPeerP2PIncomingConnection

app/controllers/index.js:83–91  ·  view source on GitHub ↗
(event, data)

Source from the content-addressed store, hash-verified

81 },
82
83 _onPeerP2PIncomingConnection(event, data) {
84 const { connection } = data;
85 const peers = this.model;
86 const peer = peers.findBy('peer.id', connection.peer);
87
88 // Don't switch to 'connecting' state on incoming connection,
89 // as p2p connection may still fail.
90 peer.set('peer.connection', connection);
91 },
92
93 _onPeerDCIncomingConnection(event, data) {
94 const { connection } = data;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected