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);