this refactor includes changes to TClient:
- all member fields are now public, but protected with Sync (an alias
for boost::synchronized_value
- removed all (now) obsolete getters and setters
changes to TServer and TNetwork:
- thread-safe ID generation, previously it was possible for there to be
ID duplicates. this is now solved by moving id generation and
assignment into the same mutex locked context.
- deprecated ForEachClientWeak and replaced some usages of it with
ForEachClient, getting rid of the weak_ptr shit in most places
- implemented a bunch of new functions for getting rid of more weak_ptr
everywhere
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.
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.
* Add preliminary work for HTTP health endpoint
* Http: Fix infinite loop bug in Tx509KeypairGenerator::generateKey()
* update commandline
* Add TLS Support class for use with http server
* Add preliminary HTTP Server; TLS still broken; fix in later commit
* Fix TLS handshake, due to server being unable to serve key/certfile in 'Http.h/Http.cpp'; Cause was httlib not being threadsafe due to being a blocking http library
* Run clang format
* Add option to configure http server port via ServerConfig
* TConfig: add HTTPServerPort to config parsing step
* Fix SSL Cert / Key path not auto generating when not existing
* Add health endpoint; Fix SSL Cert serial no. not refreshing when regenerating
* Switch arround status codes in /health route
* Run clang format
Co-authored-by: Lion Kortlepel <development@kortlepel.com>