From dda85d92c9bafd0fe86540efd0f30be3e6c08c03 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 19 Jun 2022 03:59:08 -0700 Subject: implement a custom websocket client --- src/javascript/jsc/bindings/ScriptExecutionContext.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/javascript/jsc/bindings/ScriptExecutionContext.cpp') diff --git a/src/javascript/jsc/bindings/ScriptExecutionContext.cpp b/src/javascript/jsc/bindings/ScriptExecutionContext.cpp index b89e0645f..9c6735993 100644 --- a/src/javascript/jsc/bindings/ScriptExecutionContext.cpp +++ b/src/javascript/jsc/bindings/ScriptExecutionContext.cpp @@ -63,18 +63,18 @@ static uWS::WebSocketContext* registerWebSocket auto* opts = ctx->getExt(); /* Maximum message size we can receive */ - static unsigned int maxPayloadLength = 128 * 1024 * 1024; + unsigned int maxPayloadLength = 16 * 1024; /* 2 minutes timeout is good */ - static unsigned short idleTimeout = 120; + unsigned short idleTimeout = 120; /* 64kb backpressure is probably good */ - static unsigned int maxBackpressure = 128 * 1024 * 1024; - static bool closeOnBackpressureLimit = false; + unsigned int maxBackpressure = 64 * 1024; + bool closeOnBackpressureLimit = false; /* This one depends on kernel timeouts and is a bad default */ - static bool resetIdleTimeoutOnSend = false; + bool resetIdleTimeoutOnSend = false; /* A good default, esp. for newcomers */ - static bool sendPingsAutomatically = true; + bool sendPingsAutomatically = false; /* Maximum socket lifetime in seconds before forced closure (defaults to disabled) */ - static unsigned short maxLifetime = 0; + unsigned short maxLifetime = 0; opts->maxPayloadLength = maxPayloadLength; opts->maxBackpressure = maxBackpressure; -- cgit v1.2.3