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 {