Compare commits

...

2 Commits

Author SHA1 Message Date
Derrick Hammer 35bf05c25e
*Update dist 2023-04-16 05:38:59 -04:00
Derrick Hammer f842cd84c4
**createSocket does not need to be async 2023-04-16 05:38:36 -04:00
3 changed files with 3 additions and 5 deletions

View File

@ -25,7 +25,7 @@ export default class MultiSocketProxy extends Proxy {
handleClosePeer(peer: Peer): Promise<void>;
get(pubkey: Uint8Array): PeerEntity | undefined;
update(pubkey: Uint8Array, data: Partial<PeerEntity>): void;
createSocket(options: TcpSocketConnectOpts): Promise<typeof this.socketClass>;
createSocket(options: TcpSocketConnectOpts): typeof this.socketClass;
private _registerOpenSocketMessage;
private _registerWriteSocketMessage;
private _registerCloseSocketMessage;

View File

@ -136,7 +136,7 @@ class MultiSocketProxy extends proxy_js_1.default {
},
});
}
async createSocket(options) {
createSocket(options) {
if (!this._peers.size) {
throw new Error("no peers found");
}

View File

@ -172,9 +172,7 @@ export default class MultiSocketProxy extends Proxy {
} as PeerEntity);
}
public async createSocket(
options: TcpSocketConnectOpts
): Promise<typeof this.socketClass> {
public createSocket(options: TcpSocketConnectOpts): typeof this.socketClass {
if (!this._peers.size) {
throw new Error("no peers found");
}