aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/utility
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/src/utility/Constants.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/src/utility/Constants.js b/server/src/utility/Constants.js
new file mode 100644
index 0000000..6836421
--- /dev/null
+++ b/server/src/utility/Constants.js
@@ -0,0 +1,19 @@
+/**
+ * Rate limit options
+ * @typedef {Object} RateLimits
+ * @property {number} halflife Time in milliseconds to decrement ratelimit weight
+ * @property {number} threshold Weight until ratelimited
+ */
+exports.RateLimits = {
+ halflife: 30 * 1000,
+ threshold: 25,
+};
+
+/**
+ * Websocket server options
+ * @typedef {Object} ServerConst
+ * @property {number} PulseSpeed Time in milliseconds to ping each client
+ */
+exports.ServerConst = {
+ PulseSpeed: 16 * 1000,
+};