clientlog: add support for KoD rate limiting

Add a third return value to CLG_LimitServiceRate() to indicate the
server should send a response requesting the client to reduce its
polling rate. It randomly selects from a fraction (configurable to 1/2,
1/4, 1/8, 1/16, or disabled) of responses which would be dropped
(after selecting responses for the leak option).
This commit is contained in:
Miroslav Lichvar
2024-04-02 15:05:19 +02:00
parent c8c7f518b1
commit aac898343e
3 changed files with 67 additions and 20 deletions

View File

@@ -40,6 +40,7 @@ typedef enum {
typedef enum {
CLG_PASS = 0,
CLG_DROP,
CLG_KOD,
} CLG_Limit;
extern void CLG_Initialise(void);