The UDPServerMain was badly designed and had multiple potential bugs and
unexpected & silent failures. The changes simplify the code here, and
tracks those unexpected failures in app-wide statistics. Also added,
while at that, some more tracking of how many packets and bytes are
sent & received per client
Before, a lot of common errors went unnoticed, due to insufficient
compiler diagnostics. This commit fixes this by adding a lot of new
diagnostics, and fixing the issues found by this.
The event loop tries to run no faster than every 10ms. If it detects
that it goes faster, it would incorrectly calculate the difference, and
then wait (what I assume was) way too long or too short.
Either way, now it's fixed and it correctly works, even when introducing
new lua states.
onInit is now called on hot-reload, for the whole plugin. Arguably, this
is not expected behavior, since only one file is being reloaded, but
this is the easiest way to do it, and the entire hot-reload process is
only for development purposes. Open an issue if this breaks your stuff
:^)
@jimkoen
This was removed because, as useful and as much work as this was, we
can't reasonably take responsibility for this. Instead, a server like
this should *always* be localhost only, and if it's not, it should be
behind an nginx reverse proxy anyways. We're removing the config options
regarding this in one of the next commits.
There are two CallStrategies:
- BestEffort (default): Will try to get your event to trigger at the specified
interval, but will refuse to queue handlers if a handler takes too
long.
- Precise: Will enqueue event handlers at the exact interval specified.
Can lead to the queue filling up if the handler takes longer than the
interval.
CMake will now find packages in a modern way (include(Find*)), and will
also ensure that submodules are updated, unless told otherwise.
Also removed some apple-specific workarounds, we will need to look at
that again.