Compare commits

..

No commits in common. "b14509d6f18124bffdf201766aadaa984922fabb" and "baf0ac31e6962da9a97c8267b9df07bb16e7b8bf" have entirely different histories.

3 changed files with 4 additions and 12 deletions

3
dist/peer.d.ts vendored
View File

@ -42,8 +42,7 @@ export default class Peer {
private _onsend; private _onsend;
private _onclose; private _onclose;
private _emulateWebsocket; private _emulateWebsocket;
constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket, }: PeerOptionsWithProxy & DataSocketOptions);
private _channel?; private _channel?;
get channel(): any; constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket, }: PeerOptionsWithProxy & DataSocketOptions);
init(): Promise<void>; init(): Promise<void>;
} }

5
dist/peer.js vendored
View File

@ -15,6 +15,7 @@ class Peer {
_onsend; _onsend;
_onclose; _onclose;
_emulateWebsocket; _emulateWebsocket;
_channel;
constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket = false, }) { constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket = false, }) {
this._proxy = proxy; this._proxy = proxy;
this._peer = peer; this._peer = peer;
@ -25,10 +26,6 @@ class Peer {
this._onclose = onclose?.bind(undefined, this); this._onclose = onclose?.bind(undefined, this);
this._emulateWebsocket = emulateWebsocket; this._emulateWebsocket = emulateWebsocket;
} }
_channel;
get channel() {
return this._channel;
}
async init() { async init() {
const write = async (data, cb) => { const write = async (data, cb) => {
pipe.send(data); pipe.send(data);

View File

@ -56,6 +56,8 @@ 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,
@ -76,12 +78,6 @@ 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);