From 68cd8008a63c8ef0681075a6c8723330af4377b8 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 25 Feb 2023 22:21:09 -0500 Subject: [PATCH] *add emulateWebsocket to proxy --- src/proxy.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/proxy.ts b/src/proxy.ts index 22d117d..9d46048 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -22,12 +22,19 @@ export default class Proxy { onclose, listen = false, autostart = false, + emulateWebsocket = false, }: ProxyOptions) { this._swarm = swarm; this._protocol = protocol; this._listen = listen; this._autostart = autostart; - this._socketOptions = { onopen, onreceive, onsend, onclose }; + this._socketOptions = { + onopen, + onreceive, + onsend, + onclose, + emulateWebsocket, + }; this.init(); }