holochain / n3h

nodejs implementation of holochain networking / p2p backend process
48 stars 7 forks source link

"Rude" Peer disconnexion handling #82

Closed ddd-mtl closed 5 years ago

ddd-mtl commented 5 years ago

General

Implemented peerDisconnect event for p2p-spec Added peerTimedOut event for dht-spec. Added dropPeerLocal() to dht-spec & dht-fullsync. (Did NOT add peerDisconnected to JsonProtocol for now. Core is not notified of peerDisconnections.)

Realmode

changed _peerList to _peerTracks, a map of machineId -> (dnaId -> [agentId]). It is used for tracking which peer is tracking which dna as which agent.

Naming clarification

peerAddress is whatever we use to store peer data in a DHT. machineId is pub sign key generated by n3h for a folder, used to identify a device. bootstrapPeer -> bootstrapRelayPeer

Changed this._advertise() to this._setPeerInfo()

Misc.

Now sending pid to Core because of windows closing issue.