From 7bbfe577c3a5b12a0ed1ba5f51b4b482843d1da5 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 5 Mar 2023 03:00:04 -0500 Subject: [PATCH] *Add getter for socket --- src/peer.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/peer.ts b/src/peer.ts index ec183d8..6a2fad7 100644 --- a/src/peer.ts +++ b/src/peer.ts @@ -53,7 +53,6 @@ export default class Peer { private _proxy: Proxy; private _peer: any; private _muxer: any; - private _socket?: Socket; private _onopen: OnOpenBound; private _onreceive: OnReceiveBound; private _onsend: OnSendBound; @@ -83,6 +82,12 @@ export default class Peer { this._emulateWebsocket = emulateWebsocket; } + private _socket?: Socket; + + get socket(): Socket { + return this._socket; + } + private _channel?: any; get channel(): any {