Compare commits

..

No commits in common. "d94eec7c7eab4ab96e97c3748ae9e35863f3c801" and "6b42c2400fbdf7a94b2cfbbd2c971b06b7d5489d" have entirely different histories.

3 changed files with 4 additions and 17 deletions

2
dist/proxy.d.ts vendored
View File

@ -9,7 +9,7 @@ export default class Proxy {
private _listen; private _listen;
private _socketOptions; private _socketOptions;
private _autostart; private _autostart;
constructor({ swarm, protocol, onopen, onreceive, onsend, onclose, listen, autostart, emulateWebsocket, }: ProxyOptions); constructor({ swarm, protocol, onopen, onreceive, onsend, onclose, listen, autostart, }: ProxyOptions);
private _swarm; private _swarm;
get swarm(): any; get swarm(): any;
private _protocol; private _protocol;

10
dist/proxy.js vendored
View File

@ -9,18 +9,12 @@ class Proxy {
_listen; _listen;
_socketOptions; _socketOptions;
_autostart; _autostart;
constructor({ swarm, protocol, onopen, onreceive, onsend, onclose, listen = false, autostart = false, emulateWebsocket = false, }) { constructor({ swarm, protocol, onopen, onreceive, onsend, onclose, listen = false, autostart = false, }) {
this._swarm = swarm; this._swarm = swarm;
this._protocol = protocol; this._protocol = protocol;
this._listen = listen; this._listen = listen;
this._autostart = autostart; this._autostart = autostart;
this._socketOptions = { this._socketOptions = { onopen, onreceive, onsend, onclose };
onopen,
onreceive,
onsend,
onclose,
emulateWebsocket,
};
this.init(); this.init();
} }
_swarm; _swarm;

View File

@ -22,19 +22,12 @@ export default class Proxy {
onclose, onclose,
listen = false, listen = false,
autostart = false, autostart = false,
emulateWebsocket = false,
}: ProxyOptions) { }: ProxyOptions) {
this._swarm = swarm; this._swarm = swarm;
this._protocol = protocol; this._protocol = protocol;
this._listen = listen; this._listen = listen;
this._autostart = autostart; this._autostart = autostart;
this._socketOptions = { this._socketOptions = { onopen, onreceive, onsend, onclose };
onopen,
onreceive,
onsend,
onclose,
emulateWebsocket,
};
this.init(); this.init();
} }