Compare commits

..

No commits in common. "c72f45393ca99d9125a57cf22605933f36c3ddb3" and "ce3a3fa8ad82167558f4a5c1cf0f74dab3d403ea" have entirely different histories.

4 changed files with 1 additions and 26 deletions

1
dist/index.d.ts vendored
View File

@ -17,6 +17,5 @@ export default class DHTFlood extends EventEmitter {
private handleMessage;
private setupPeer;
broadcast(data: any, ttl?: number): void;
send(peer: any, data: any, ttl?: number): void;
}
//# sourceMappingURL=index.d.ts.map

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAoBlC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IAChD,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,KAAK,CAAM;gBAEP,EACV,OAAkB,EAClB,GAAS,EACT,aAAiB,EACjB,EAA2B,EAC3B,KAAY,GACb;;;;;;KAAK;IAkBN,OAAO,CAAC,aAAa;IAiCrB,OAAO,CAAC,SAAS;IA6CjB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;IAenC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;CAY1C"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAoBlC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IAChD,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,KAAK,CAAM;gBAEP,EACV,OAAkB,EAClB,GAAS,EACT,aAAiB,EACjB,EAA2B,EAC3B,KAAY,GACb;;;;;;KAAK;IAkBN,OAAO,CAAC,aAAa;IAiCrB,OAAO,CAAC,SAAS;IA6CjB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;CAcpC"}

11
dist/index.js vendored
View File

@ -108,16 +108,5 @@ class DHTFlood extends events_1.default {
});
}
}
send(peer, data, ttl = this.ttl) {
this.messageNumber++;
const { id, messageNumber } = this;
const message = this.setupPeer(peer);
message.send({
originId: id,
messageNumber,
ttl,
data: b4a_1.default.from(data),
});
}
}
exports.default = DHTFlood;

View File

@ -141,17 +141,4 @@ export default class DHTFlood extends EventEmitter {
});
}
}
send(peer: any, data: any, ttl = this.ttl) {
this.messageNumber++;
const { id, messageNumber } = this;
const message = this.setupPeer(peer);
message.send({
originId: id,
messageNumber,
ttl,
data: b4a.from(data),
});
}
}