diff options
author | marzavec <admin@marzavec.com> | 2019-11-07 08:35:23 +0100 |
---|---|---|
committer | marzavec <admin@marzavec.com> | 2019-11-07 08:35:23 +0100 |
commit | f28e65ab8035682372edbe1c11d9ca2581e0a2e6 (patch) | |
tree | a75c9b682ca245baa3f01df5ea704ba95205cef3 /server/src/utility | |
parent | Merge pull request #79 from 0x17de/feature-emote-trip (diff) | |
download | hackchat-f28e65ab8035682372edbe1c11d9ca2581e0a2e6.tar.gz hackchat-f28e65ab8035682372edbe1c11d9ca2581e0a2e6.zip |
Syntax update and formatting tweaks
Diffstat (limited to 'server/src/utility')
-rw-r--r-- | server/src/utility/Constants.js | 19 |
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, +}; |