parent
e18055e606
commit
3b87e81c12
10
src/index.ts
10
src/index.ts
|
@ -1,6 +1,5 @@
|
||||||
import DHTOnlineBase from "./dhtOnlineBase.js";
|
import DHTOnlineBase from "./dhtOnlineBase.js";
|
||||||
import DHTFlood from "@lumeweb/dht-flood";
|
import DHTFlood from "@lumeweb/dht-flood";
|
||||||
import * as stream from "stream";
|
|
||||||
|
|
||||||
const DISCONNECT_SMOOTH = 500;
|
const DISCONNECT_SMOOTH = 500;
|
||||||
|
|
||||||
|
@ -10,9 +9,12 @@ export default class DHTOnline extends DHTOnlineBase {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
swarm: any,
|
swarm: any,
|
||||||
{ id = swarm.keyPair.publicKey, data = {}, protocol, ...opts } = {
|
{
|
||||||
protocol: undefined,
|
id = swarm.keyPair.publicKey,
|
||||||
}
|
data = {},
|
||||||
|
protocol = undefined,
|
||||||
|
...opts
|
||||||
|
} = {}
|
||||||
) {
|
) {
|
||||||
super(id, opts);
|
super(id, opts);
|
||||||
this.flood = new DHTFlood({ id, swarm, protocol, ...opts });
|
this.flood = new DHTFlood({ id, swarm, protocol, ...opts });
|
||||||
|
|
Loading…
Reference in New Issue