diff --git a/src/index.ts b/src/index.ts index 0c8a0de..eb11837 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,10 +9,15 @@ export default class DHTOnline extends DHTOnlineBase { constructor( swarm: any, - { id = swarm.keyPair.publicKey, data = {}, ...opts } = {} + { + id = swarm.keyPair.publicKey, + data = {}, + protocol = undefined, + ...opts + } = {} ) { super(id, opts); - this.flood = new DHTFlood({ id, swarm, ...opts }); + this.flood = new DHTFlood({ id, swarm, protocol, ...opts }); this.swarm = swarm; this.flood.on("peer-open", (peer) => this.handlePeerAdd(peer));