*Add getter for channel

This commit is contained in:
Derrick Hammer 2023-03-02 05:41:13 -05:00
parent baf0ac31e6
commit b3a7c0b4e1
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 2 deletions

View File

@ -56,8 +56,6 @@ export default class Peer {
private _onclose: OnCloseBound; private _onclose: OnCloseBound;
private _emulateWebsocket: boolean; private _emulateWebsocket: boolean;
private _channel?: any;
constructor({ constructor({
proxy, proxy,
peer, peer,
@ -78,6 +76,12 @@ export default class Peer {
this._emulateWebsocket = emulateWebsocket; this._emulateWebsocket = emulateWebsocket;
} }
private _channel?: any;
get channel(): any {
return this._channel;
}
async init() { async init() {
const write = async (data: any, cb: Function) => { const write = async (data: any, cb: Function) => {
pipe.send(data); pipe.send(data);