* Add initialization of messages and empty implementation of handleChannelOnOpen in Peer class.

This commit is contained in:
Derrick Hammer 2023-04-16 07:10:21 -04:00
parent 39499397ea
commit 85ff38d871
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,9 @@ import Socket from "../../socket.js";
import MultiSocketProxy from "../multiSocket.js"; import MultiSocketProxy from "../multiSocket.js";
export default class Peer extends BasePeer { export default class Peer extends BasePeer {
protected async initMessages(): Promise<void> {
await this._proxy.handleNewPeerChannel(this);
}
protected declare _proxy: MultiSocketProxy; protected declare _proxy: MultiSocketProxy;
protected async initSocket() {} protected async initSocket() {}
@ -14,8 +17,5 @@ export default class Peer extends BasePeer {
return this._proxy.handleClosePeer(this); return this._proxy.handleClosePeer(this);
} }
protected async handleChannelOnOpen(m: any): Promise<void> { protected async handleChannelOnOpen(m: any): Promise<void> {}
await this._proxy.handleNewPeerChannel(this);
this._proxy.emit("peerOpen", this);
}
} }