These control the number of jobs that may be enqueued before error, and
the number of concurrent threads to process jobs, respectively.
Also renamed 'misc' subdir to 'doc'
Also added some /stats: show all the configured global Options as they
came in from conf file/CLI. ("Config" subdict in /stats JSON).
The DoS protection added is against unlikely and hard-to-pull-off memory
exhaustion attacks whereby clients fill our receive buffers with data
without sending newlines. If we detect our receive buffer (default 4MB
buffer size) is starting to fill, we time clients out quickly if no
newline arrives within 5 seconds.
Per-IP connection limit defaults to 12, but is configurable from the
config file.
Also added exlusion sets for subnets for this (and any future per-IP
limits).
By default localhost-originating connections are excluded.
Also in this commit:
- Replaced some usages of QMap with QHash for data items where order is
not important -- QHash is faster.
- Made the global 'id' type from IdMixin be IdMixin::Id (type alias for
quint4). This way code using this data item is cleared/easier to read
and more explicit in what it's doing.
- Already supports listening on as many sockets as you wish
- Each listening server has its own thread
- Will implement later: SSL server
Also refactored code a bit, created the generic "Controller" class, made
EXMgr and SrvMgr inherit from it.
ToDo: Figure out workflow for connections and clients, model client
sessions, etc.