Compare commits

...

3 Commits

Author SHA1 Message Date
Derrick Hammer 4b1b828c69
*update dist 2023-04-15 19:45:35 -04:00
Derrick Hammer 8ea1ad3006
*make _socketOptions protected 2023-04-15 19:45:16 -04:00
Derrick Hammer ddf6b2c9d8
*add getter for socketOptions 2023-04-15 19:44:01 -04:00
3 changed files with 12 additions and 3 deletions

3
dist/proxy.d.ts vendored
View File

@ -7,9 +7,10 @@ export interface ProxyOptions extends DataSocketOptions {
}
export default abstract class Proxy {
protected _listen: any;
protected _socketOptions: DataSocketOptions;
protected _autostart: boolean;
constructor({ swarm, protocol, onopen, onreceive, onsend, onclose, onchannel, listen, autostart, emulateWebsocket, createDefaultMessage, }: ProxyOptions);
protected _socketOptions: DataSocketOptions;
get socketOptions(): DataSocketOptions;
private _swarm;
get swarm(): any;
private _protocol;

5
dist/proxy.js vendored
View File

@ -7,7 +7,6 @@ const protomux_1 = __importDefault(require("protomux"));
const peer_js_1 = __importDefault(require("./peer.js"));
class Proxy {
_listen;
_socketOptions;
_autostart;
constructor({ swarm, protocol, onopen, onreceive, onsend, onclose, onchannel, listen = false, autostart = false, emulateWebsocket = false, createDefaultMessage = true, }) {
this._swarm = swarm;
@ -25,6 +24,10 @@ class Proxy {
};
this.init();
}
_socketOptions;
get socketOptions() {
return this._socketOptions;
}
_swarm;
get swarm() {
return this._swarm;

View File

@ -10,7 +10,6 @@ export interface ProxyOptions extends DataSocketOptions {
export default abstract class Proxy {
protected _listen: any;
protected _socketOptions: DataSocketOptions;
protected _autostart: boolean;
constructor({
@ -42,6 +41,12 @@ export default abstract class Proxy {
this.init();
}
protected _socketOptions: DataSocketOptions;
get socketOptions(): DataSocketOptions {
return this._socketOptions;
}
private _swarm: any;
get swarm(): any {