Software / code / prosody-modules
Comparison
mod_limits/README.markdown @ 1820:8de50be756e5
Various README files: Correct indentation levels, fix syntax and other small fixes
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 02 Sep 2015 17:30:33 +0200 |
| parent | 1803:4d73a1a6ba68 |
| child | 4782:b935276ab1b4 |
comparison
equal
deleted
inserted
replaced
| 1819:1b08597b5e6f | 1820:8de50be756e5 |
|---|---|
| 32 - component | 32 - component |
| 33 | 33 |
| 34 The limits are specified like so in the **global** section of your | 34 The limits are specified like so in the **global** section of your |
| 35 config (they cannot be per-host): | 35 config (they cannot be per-host): |
| 36 | 36 |
| 37 limits = { | 37 ``` {.lua} |
| 38 c2s = { | 38 limits = { |
| 39 rate = "3kb/s"; | 39 c2s = { |
| 40 burst = "2s"; | 40 rate = "3kb/s"; |
| 41 }; | 41 burst = "2s"; |
| 42 s2sin = { | 42 }; |
| 43 rate = "10kb/s"; | 43 s2sin = { |
| 44 burst = "5s"; | 44 rate = "10kb/s"; |
| 45 }; | 45 burst = "5s"; |
| 46 } | 46 }; |
| 47 } | |
| 48 ``` | |
| 47 | 49 |
| 48 All units are in terms of *bytes*, not *bits*, so that "kb/s" is | 50 All units are in terms of *bytes*, not *bits*, so that "kb/s" is |
| 49 interpreted as "kilobytes per second", where a kilobyte is 1000 bytes. | 51 interpreted as "kilobytes per second", where a kilobyte is 1000 bytes. |
| 50 | 52 |
| 51 Compatibility | 53 Compatibility |
| 52 ============= | 54 ============= |
| 53 | 55 |
| 54 ----- ------------------- | 56 ----- ------------------- |
| 55 0.9 Works | 57 0.9 Works |
| 56 0.8 Doesn't work(`*`) | 58 0.8 Doesn't work(\*) |
| 57 ----- ------------------- | 59 ----- ------------------- |
| 58 | 60 |
| 59 (`*`) This module can be made to work in 0.8 if you do two things: | 61 (\*) This module can be made to work in 0.8 if you do two things: |
| 60 | 62 |
| 61 1. Install | 63 1. Install |
| 62 [util.throttle](http://hg.prosody.im/0.9/raw-file/d46948d3018a/util/throttle.lua) | 64 [util.throttle](http://hg.prosody.im/0.9/raw-file/d46948d3018a/util/throttle.lua) |
| 63 into your Prosody source's util/ directory. | 65 into your Prosody source's util/ directory. |
| 64 2. If you use libevent apply [this | 66 2. If you use libevent apply [this |