*Update dist
This commit is contained in:
parent
c534be442c
commit
866c91c0c6
|
@ -15,19 +15,17 @@ export default class DHTOnlineBase extends EventEmitter {
|
||||||
get online(): string[];
|
get online(): string[];
|
||||||
broadcast(data: any, ttl?: number): void;
|
broadcast(data: any, ttl?: number): void;
|
||||||
getPeerData(id: Buffer | string): any;
|
getPeerData(id: Buffer | string): any;
|
||||||
protected setData(data: any): void;
|
setData(data: any): void;
|
||||||
private _broadcastData;
|
private _broadcastData;
|
||||||
protected onAddPeer(id: Buffer): void;
|
protected onAddPeer(id: Buffer): void;
|
||||||
protected onRemovePeer(id: Buffer): void;
|
protected onRemovePeer(id: Buffer): void;
|
||||||
protected onGetBroadcast(message: Buffer, id: Buffer): void;
|
protected onGetBroadcast(message: Buffer, id: Buffer): void;
|
||||||
private _hasSeenPeer;
|
private _hasSeenPeer;
|
||||||
private _setPeer;
|
private _setPeer;
|
||||||
private _removePeer;
|
|
||||||
private _ensurePeer;
|
private _ensurePeer;
|
||||||
private _addPeerConnection;
|
private _addPeerConnection;
|
||||||
private _removePeerConnection;
|
private _removePeerConnection;
|
||||||
private _bootstrapFrom;
|
private _bootstrapFrom;
|
||||||
private _getPeerConnectedTo;
|
|
||||||
private _getBootstrapInfo;
|
private _getBootstrapInfo;
|
||||||
private _recalculate;
|
private _recalculate;
|
||||||
private _maybeHexify;
|
private _maybeHexify;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"dhtOnlineBase.d.ts","sourceRoot":"","sources":["../src/dhtOnlineBase.ts"],"names":[],"mappings":";;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAYlC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IACrD,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,WAAW,CAAW;IAC9B,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,QAAQ,CAAoB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OAAO,CAAW;IAE1B,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;IAED,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM;IAIjC,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAIxB,OAAO,CAAC,IAAI,EAAE,GAAG;IAQxB,OAAO,CAAC,cAAc;IAgBtB,SAAS,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM;IAqC9B,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM;IAiBjC,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IA6CpD,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,QAAQ;IAGhB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,YAAY;IAwBpB,OAAO,CAAC,YAAY;CAOrB"}
|
|
@ -135,9 +135,6 @@ class DHTOnlineBase extends events_1.default {
|
||||||
_setPeer(id, data) {
|
_setPeer(id, data) {
|
||||||
this.graph.addNode(this._maybeHexify(id), data);
|
this.graph.addNode(this._maybeHexify(id), data);
|
||||||
}
|
}
|
||||||
_removePeer(id) {
|
|
||||||
this.graph.removeNode(this._maybeHexify(id));
|
|
||||||
}
|
|
||||||
_ensurePeer(id) {
|
_ensurePeer(id) {
|
||||||
id = this._maybeHexify(id);
|
id = this._maybeHexify(id);
|
||||||
if (!this._hasSeenPeer(id)) {
|
if (!this._hasSeenPeer(id)) {
|
||||||
|
@ -185,9 +182,6 @@ class DHTOnlineBase extends events_1.default {
|
||||||
this.emit("bootstrapped");
|
this.emit("bootstrapped");
|
||||||
this._recalculate();
|
this._recalculate();
|
||||||
}
|
}
|
||||||
_getPeerConnectedTo(id) {
|
|
||||||
return this.graph.successors(id);
|
|
||||||
}
|
|
||||||
_getBootstrapInfo() {
|
_getBootstrapInfo() {
|
||||||
const state = {};
|
const state = {};
|
||||||
for (const [id, rawData] of this.graph.nodes(true)) {
|
for (const [id, rawData] of this.graph.nodes(true)) {
|
||||||
|
|
Loading…
Reference in New Issue