From b3a7c0b4e1ad4b5d8c6e6622ea7ee4164b6943c7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 2 Mar 2023 05:41:13 -0500 Subject: [PATCH] *Add getter for channel --- src/peer.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/peer.ts b/src/peer.ts index 379ed39..1b94396 100644 --- a/src/peer.ts +++ b/src/peer.ts @@ -56,8 +56,6 @@ export default class Peer { private _onclose: OnCloseBound; private _emulateWebsocket: boolean; - private _channel?: any; - constructor({ proxy, peer, @@ -78,6 +76,12 @@ export default class Peer { this._emulateWebsocket = emulateWebsocket; } + private _channel?: any; + + get channel(): any { + return this._channel; + } + async init() { const write = async (data: any, cb: Function) => { pipe.send(data);