From b2b041c3a1ab67402dea953477a91ab8b6675c4d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 15 Apr 2023 19:34:45 -0400 Subject: [PATCH] *override callbacks --- src/proxies/multiSocket.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/proxies/multiSocket.ts b/src/proxies/multiSocket.ts index 0f7d373..f3e5a6f 100644 --- a/src/proxies/multiSocket.ts +++ b/src/proxies/multiSocket.ts @@ -80,6 +80,9 @@ export default class MultiSocketProxy extends Proxy { createDefaultMessage: false, ...options, }); + this._socketOptions.onchannel = this.handleNewPeerChannel.bind(this); + this._socketOptions.onclose = this.handleClosePeer.bind(this); + this._socketOptions.onopen = this.handlePeer.bind(this); if (options.socketClass) { this.socketClass = options.socketClass; } else {