33 lines
1019 B
TypeScript
33 lines
1019 B
TypeScript
/// <reference types="node" />
|
|
/// <reference types="node" />
|
|
import EventEmitter from "events";
|
|
export default class DHTOnlineBase extends EventEmitter {
|
|
private id;
|
|
private bootstrapped;
|
|
private graph;
|
|
private connectedTo;
|
|
private data;
|
|
private encoding;
|
|
constructor(id: Buffer, { encoding }?: {
|
|
encoding?: string | undefined;
|
|
});
|
|
private _online;
|
|
get online(): string[];
|
|
broadcast(data: any, ttl?: number): void;
|
|
getPeerData(id: Buffer | string): any;
|
|
setData(data: any): void;
|
|
private _broadcastData;
|
|
protected onAddPeer(id: Buffer): void;
|
|
protected onRemovePeer(id: Buffer): void;
|
|
protected onGetBroadcast(message: Buffer, id: Buffer): void;
|
|
private _hasSeenPeer;
|
|
private _setPeer;
|
|
private _ensurePeer;
|
|
private _addPeerConnection;
|
|
private _removePeerConnection;
|
|
private _bootstrapFrom;
|
|
private _getBootstrapInfo;
|
|
private _recalculate;
|
|
private _maybeHexify;
|
|
}
|
|
//# sourceMappingURL=dhtOnlineBase.d.ts.map
|