@berish/rfp
Version:
Binary secure transport organization protocol for peer communication using function fingerprints
22 lines • 586 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PeerPull = void 0;
class PeerPull {
constructor() {
this._peers = [];
}
get peers() {
return this._peers;
}
registerPeer(peer) {
const index = this.peers.indexOf(peer);
if (index === -1)
this._peers = this.peers.concat(peer);
}
unregisterPeer(peer) {
if (this.peers.indexOf(peer) !== -1)
this._peers = this.peers.filter((m) => m !== peer);
}
}
exports.PeerPull = PeerPull;
//# sourceMappingURL=pull.js.map