aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/utility/Constants.js
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2019-11-07 08:35:23 +0100
committermarzavec <admin@marzavec.com>2019-11-07 08:35:23 +0100
commitf28e65ab8035682372edbe1c11d9ca2581e0a2e6 (patch)
treea75c9b682ca245baa3f01df5ea704ba95205cef3 /server/src/utility/Constants.js
parentMerge pull request #79 from 0x17de/feature-emote-trip (diff)
downloadhackchat-f28e65ab8035682372edbe1c11d9ca2581e0a2e6.tar.gz
hackchat-f28e65ab8035682372edbe1c11d9ca2581e0a2e6.zip
Syntax update and formatting tweaks
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,
+};