From 85ff38d87103b4c121b56b20ba5c941effa23c49 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 16 Apr 2023 07:10:21 -0400 Subject: [PATCH] * Add initialization of messages and empty implementation of handleChannelOnOpen in Peer class. --- src/proxies/multiSocket/peer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/proxies/multiSocket/peer.ts b/src/proxies/multiSocket/peer.ts index b969efb..9f7f533 100644 --- a/src/proxies/multiSocket/peer.ts +++ b/src/proxies/multiSocket/peer.ts @@ -3,6 +3,9 @@ import Socket from "../../socket.js"; import MultiSocketProxy from "../multiSocket.js"; export default class Peer extends BasePeer { + protected async initMessages(): Promise { + await this._proxy.handleNewPeerChannel(this); + } protected declare _proxy: MultiSocketProxy; protected async initSocket() {} @@ -14,8 +17,5 @@ export default class Peer extends BasePeer { return this._proxy.handleClosePeer(this); } - protected async handleChannelOnOpen(m: any): Promise { - await this._proxy.handleNewPeerChannel(this); - this._proxy.emit("peerOpen", this); - } + protected async handleChannelOnOpen(m: any): Promise {} }