117 Commits

Author SHA1 Message Date
Lion Kortlepel
e595192829
rename header to boost errc 2022-10-06 00:43:17 +02:00
Lion Kortlepel
917e3f98ab
fix github actions dependencies for linux to use proper boost version 2022-10-06 00:36:57 +02:00
Lion Kortlepel
c42a523532
remove SO_SNDTIMEO for now 2022-10-06 00:24:13 +02:00
Lion Kortlepel
231b13a0e7
fix a ghost client bug 2022-10-05 18:17:18 +02:00
Lion Kortlepel
7d2e4d4581
replace tcp networking with boost::asio tcp networking 2022-10-05 18:17:04 +02:00
Lion Kortlepel
7446526a19
fix binding of udp server socket
it was not binding properly because it wasn't open()ed, i guess
2022-10-05 13:06:36 +02:00
Lion Kortlepel
6e97a3cd6e
switch udp networking to boost implementation 2022-10-05 12:14:25 +02:00
Lion Kortlepel
5d3dff3c88
add identifiers (beammp id, ip) as an argument to onPlayerAuth 2022-10-03 15:31:32 +02:00
Lion Kortlepel
24c98eb2b2
add more compile-time diagnostics, implement fixes for them
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.
2022-09-26 12:02:05 +02:00
Lion Kortlepel
fd7b11f436
fix event loop timing issue
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.
2022-07-20 14:33:19 +02:00
Mackenzie
04bbdff6b7
Add code from EvanMulawski 2022-07-12 22:59:41 +01:00
Lion Kortlepel
817bd4b588
start fixing mod download 2022-06-28 03:20:42 +02:00
Lion Kortlepel
88f1976668
Merge branch 'rc-v3.0.2' into rc-v3.1.0 2022-04-28 14:40:57 +02:00
Lion Kortlepel
1bab3276e9
fix setsockopt SO_SNDTIMEO for windows, bump version number to 3.0.2, update commandline 2022-04-05 10:59:16 +02:00
Lion Kortlepel
4ff69528bd
fix some missing declaration 2022-03-31 23:56:02 +02:00
Lion Kortlepel
5e4c7eac51
add send timeout to client tcp socket 2022-03-31 23:53:10 +02:00
Lion Kortlepel
952631bb80
add send timeout to client tcp socket 2022-03-31 23:48:07 +02:00
Lion Kortlepel
104737571c
Merge branch 'rc-v3.0.2' into rc-v3.1.0
This is a periodic merge to keep 3.1.0 up to date with 3.0.2
2022-03-31 22:10:49 +02:00
Lion Kortlepel
d4b30a2583
CreateEventTimer: Implement CallStrategy
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.
2022-03-31 20:13:59 +02:00
Lion Kortlepel
b780a08f73
use MB constant 2022-03-24 15:16:24 +01:00
Lion Kortlepel
7a814ed35e
use fmt properly in beammp_*f logging functions 2022-03-24 14:45:53 +01:00
Lion Kortlepel
d0bb32ec63
cleanup fixme's, todo's 2022-03-24 14:26:02 +01:00
Lion Kortlepel
dbfe4a4d11
Fix inconsistencies with handling errors in early network startup
In most cases, when socket creation, bind, listen, or similar fails,
it's best to gracefully shutdown. We do that now.
2022-03-24 14:06:03 +01:00
Lion Kortlepel
36853ca683
add MSG_NOSIGNAL to all calls to send() to get rid of useless SIGPIPE signals 2022-02-11 10:59:17 +01:00
Lion Kortlepel
a5c23f8dde
Add ping packet support 2021-12-09 12:08:41 +01:00
Lion Kortlepel
cd19ae0836
Add shutting down / shutdown states to state keeper 2021-12-07 14:25:04 +01:00
Lion Kortlepel
a1335e8c7d
Add statuses, status messages 2021-12-06 13:17:54 +01:00
awesome_milou
9d283738aa
Add preliminary work for HTTP health endpoint (#68)
* 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>
2021-12-05 18:24:55 +01:00
Lion Kortlepel
b33d50361c
fix typo in --help 2021-12-05 01:40:39 +01:00
Lion Kortlepel
768d0466f4
Add simple command interface 2021-11-28 23:45:03 +01:00
Lion Kortlepel
fd7bea0f36
Add BEAMMP_{WINDOWS,LINUX,APPLE} preprocessor defines instead of platform specific ones 2021-11-27 02:11:22 +01:00
Lion Kortlepel
7169e65305
clarify thread names 2021-11-21 03:19:02 +01:00
Lion Kortlepel
c36ea52f60
Http: Use ipv4 2021-11-08 23:45:35 +01:00
Lion Kortlepel
7197c23632
TNetwork: Possible ip address fix 2021-11-08 23:10:24 +01:00
Lion Kortlepel
701a7feee3
remove boost, add httplib, temporarily remove http* lua 2021-11-07 23:54:33 +01:00
Lion Kortlepel
577d4c429d
TNetwork: Use 'K' packet instead of 'E' to kick players 2021-10-02 01:44:13 +02:00
Lion Kortlepel
d027f7f29f
Lua: Kick properly (with ClientKick), add chat message printing 2021-10-02 01:28:58 +02:00
Lion Kortlepel
d1f890752a
Report errors on WaitForAll 2021-10-01 03:56:18 +02:00
Lion Kortlepel
9eabd19e17
Report more errors, better 2021-10-01 03:52:12 +02:00
Lion Kortlepel
243e96d503
Check all futures 2021-10-01 03:27:24 +02:00
Lion Kortlepel
26ec50b199
Build libzip statically 2021-10-01 02:31:48 +02:00
Lion Kortlepel
f98ef7d41c
Lua: Call local eventhandlers synchronously when TriggerGlobalEvent is called from inside a handling state 2021-09-18 00:05:51 +02:00
Lion Kortlepel
29a858e74a
Network: Fix TConnection related compiler issue 2021-09-17 15:33:16 +02:00
Lion Kortlepel
48caae25fd
Finalize master&new-lua-features merge 2021-09-17 14:58:40 +02:00
Lion Kortlepel
883d69ba27
Merge remote-tracking branch 'origin/master' into rewrite-lua 2021-09-17 14:24:12 +02:00
Lion Kortlepel
b055fd8bda GracefullyShutdown: Add "subsystem x/y shutting down" message
Remove old "X shutting down", "X shut down" messages, they were bad and
confusing
2021-09-11 11:38:06 +03:00
Lion Kortlepel
6462636b29
Multiple merge fixes, rebase, working Https::GET 2021-09-09 12:15:55 +03:00
Lion Kortlepel
5742ab0dad
possible windows compiler fix 2021-09-09 12:15:19 +03:00
Lion Kortlepel
0087205d55
fix issues caused by rebase 2021-09-09 12:15:17 +03:00
Lion Kortlepel
d16843e45d
TNetwork: clarify error messages 2021-09-09 12:14:32 +03:00