Compare commits
2 Commits
c3c8e6fb3b
...
35bf05c25e
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 35bf05c25e | |
Derrick Hammer | f842cd84c4 |
|
@ -25,7 +25,7 @@ export default class MultiSocketProxy extends Proxy {
|
||||||
handleClosePeer(peer: Peer): Promise<void>;
|
handleClosePeer(peer: Peer): Promise<void>;
|
||||||
get(pubkey: Uint8Array): PeerEntity | undefined;
|
get(pubkey: Uint8Array): PeerEntity | undefined;
|
||||||
update(pubkey: Uint8Array, data: Partial<PeerEntity>): void;
|
update(pubkey: Uint8Array, data: Partial<PeerEntity>): void;
|
||||||
createSocket(options: TcpSocketConnectOpts): Promise<typeof this.socketClass>;
|
createSocket(options: TcpSocketConnectOpts): typeof this.socketClass;
|
||||||
private _registerOpenSocketMessage;
|
private _registerOpenSocketMessage;
|
||||||
private _registerWriteSocketMessage;
|
private _registerWriteSocketMessage;
|
||||||
private _registerCloseSocketMessage;
|
private _registerCloseSocketMessage;
|
||||||
|
|
|
@ -136,7 +136,7 @@ class MultiSocketProxy extends proxy_js_1.default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async createSocket(options) {
|
createSocket(options) {
|
||||||
if (!this._peers.size) {
|
if (!this._peers.size) {
|
||||||
throw new Error("no peers found");
|
throw new Error("no peers found");
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,9 +172,7 @@ export default class MultiSocketProxy extends Proxy {
|
||||||
} as PeerEntity);
|
} as PeerEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async createSocket(
|
public createSocket(options: TcpSocketConnectOpts): typeof this.socketClass {
|
||||||
options: TcpSocketConnectOpts
|
|
||||||
): Promise<typeof this.socketClass> {
|
|
||||||
if (!this._peers.size) {
|
if (!this._peers.size) {
|
||||||
throw new Error("no peers found");
|
throw new Error("no peers found");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue