diff options
| author | Florian Westphal <fw@strlen.de> | 2009-05-25 22:25:18 +0200 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2009-05-25 22:25:18 +0200 |
| commit | 643ae1b48bc83edad5ba5fa337f81564c79fd0cd (patch) | |
| tree | e645bf2b5137af13dd7ec04ef440149a9218b1e9 /src/testsuite/message-test.e | |
| parent | 9b1c47220fafeacda1e83b4732e1c8574062aac6 (diff) | |
| download | ngircd-643ae1b48bc83edad5ba5fa337f81564c79fd0cd.tar.gz ngircd-643ae1b48bc83edad5ba5fa337f81564c79fd0cd.zip | |
enforce upper limit on maximum number of handled commands
reported on #ngircd: pasting lots of lines into a channel can kill off many people on the channel if the read buffer is drained quickly enough and the client-side TCP can't keep up with the incoming data. This implements a throttling scheme: - an irc client may send up to 3 commands per second before a one second pause is enforced. - an irc client may send up to 256 bytes per second before a one second pause is enforced. After discussion with Alexander Barton, server <-> server links are treated specially: There is no artificial limit on the number of bytes sent per second, and up to 10 commands are processed per second before a pause is enforced. It may be neccessary to make those limits tuneable to accomondate larger networks, but for now they are compile time values.
Diffstat (limited to 'src/testsuite/message-test.e')
0 files changed, 0 insertions, 0 deletions