Commit graph

73 commits

Author SHA1 Message Date
Robert Müller 74f87ee604 Remove unnecessary trailing semicolons after method declarations 2022-03-08 20:01:26 +01:00
heinrich5991 a8664a0100 Hide the recvmmsg as an implementation detail 2022-03-04 19:33:06 +01:00
heinrich5991 3211b1de67 Remove unused Flags argument in network code 2022-03-04 19:33:06 +01:00
heinrich5991 471bb441a1 Move NETSOCKET behind a pointer so it can grow 2022-03-04 19:33:06 +01:00
trml f3b0a1e331 Add ClPredictionMargin 2022-01-09 13:08:11 +01:00
Jupeyy a663799188 uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00
Alexander Akulich 2790270abf Adopt upstream refactoring: Mark several functions as 'const' 2021-02-23 18:26:16 +03:00
heinrich5991 7663641ed2 Fix some variable name's style 2020-11-08 17:15:48 +01:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
Andrii cec8bf2195 Read server port from CNetServer but not from app config 2020-08-27 19:54:44 +03:00
Learath 28905c4659 Disable timeout for 0.7 clients 2020-06-20 19:52:23 +03:00
Learath 88ca573682 Serverinfo and Register support for 0.7
Co-authored-by: Tim Schumacher <tim@timakro.de>
2020-06-19 20:28:55 +03:00
Tim Schumacher 442148a194 Begin work on 0.7 support 2020-06-19 20:27:15 +03:00
Learath e9ba23b53a Migrate to 0.6.5 flags 2020-06-19 20:27:15 +03:00
def 85bb376bdc sv_server_info_per_second, sv_van_conn_per_second: allow 0 to disable
Clean up code a bit, also allow larger values
2019-06-11 18:12:43 +02:00
def a116ed3dbe Revert "New try at not decompressing unknown packets"
Causes connection problems with old clients
This reverts commit a3b07dbf9c.
2018-12-30 12:22:05 +01:00
Dennis Felsing 9febf58f37 New try at recvmmsg with some improvements 2018-12-16 22:59:41 +01:00
def a3b07dbf9c New try at not decompressing unknown packets 2018-12-16 22:15:45 +01:00
def d884465710 Revert "Don't decompress packets from unknown IPs"
This reverts commit 9089c2b35a.
2018-12-14 17:12:49 +01:00
Dennis Felsing 9089c2b35a Don't decompress packets from unknown IPs 2018-12-13 16:24:37 +01:00
yangfl 81a39c229b Fix typo 2018-07-10 17:29:02 +08:00
heinrich5991 9454dfbff9 Remove superfluous parameter from CServer::NewClientNoAuthCallback
The `Reset` parameter was only ever set to true, at the only call site.
2018-05-09 23:50:25 +02:00
heinrich5991 1d81d56850 Introduce new, vanilla-compatible server info protocol
This means that we have a reliable and fast way to query for extended info,
while also not wasting network bandwidth.

The protocol is designed to be extensible, there's four bytes space for
encoding more request types (currently zeroed), and there's one string in each
response packet and one string for each player available (currently the empty
string).

The protocol itself has no problems with more than 64 players, although the
current client implementation will drop the player info after the 64th player,
because it uses a static array for storage.

Also fixes #130, the player list is just sorted each time new player info
arrives.
2017-03-29 12:56:13 +02:00
necropotame b8e4e5beea Fix style in several places 2017-03-22 19:45:14 +01:00
east 1cbaa0c4ef copy resendbuffer on timeout protection 2016-05-07 19:28:16 +02:00
def 86a0f46937 Add a connection limit (fixes #408) 2016-04-27 22:09:18 +02:00
east 32ba1c9239 Antispoof dm1 fallback on flood added 2016-04-23 17:23:01 +02:00
oy e91d26b8ac force vital check on essential cl/srv messages and added additional sequence checking 2015-09-01 13:50:45 +02:00
east c1cbfcacf4 correctly reset network connection 2015-08-23 18:12:13 +02:00
east cf9e1373d7 correctly reset client 2015-08-23 17:51:28 +02:00
east c47697bdef session rejoin 2015-08-23 17:01:01 +02:00
east 09166494a5 Antispoof: fix error state 2015-08-23 12:29:41 +02:00
east e9a1c3ef92 vanilla handshake: add vital flags and use correct sequence (support for 0.6.4) 2015-08-15 10:38:39 +02:00
east 76d29f9e23 fixed dublication 2015-08-14 18:40:06 +02:00
east d82b75f760 log/info for security token protocol 2015-08-14 18:39:13 +02:00
east 051ec30832 vanilla handshake: ignore unknown sequence 2015-08-14 18:36:13 +02:00
east 9f1ab9a7bf added simple flooding detection (temprorary) 2015-08-14 18:34:22 +02:00
east d1382349f5 vanilla token handshake implemented 2015-08-14 18:30:49 +02:00
east a2174bf179 anti spoof for token protocol added 2015-08-14 18:30:12 +02:00
east 9d50085782 Fix dummy connect on servers without security token protocol 2015-04-19 23:09:55 +02:00
east 93305aef74 Fix dummy connect delay (Fullfill securitytoken handshake) 2015-04-19 19:53:37 +02:00
def 5dd83b58ff Fix security token conversion in a platform independent way 2015-04-18 23:54:19 +02:00
def a77cd039a6 Get rid of all Clang warnings 2015-04-18 22:29:28 +02:00
eeeee 0dc332c931 fix timeout protection with tokens
timeout protection code now transfers the token properly
2015-03-05 22:33:01 -08:00
heinrich5991 fa0708b99d Make the secure random stuff platform-independent 2015-03-06 01:35:08 +01:00
eeeee 85acfd9d77 added security token to protocol
to prevent packet injection from spoofed source ips
2015-03-05 11:07:03 -08:00
def f1e4700ae8 Add a timeout protection message 2014-08-17 05:04:37 +02:00
def e90d84b89f Fix the wrong "Timeout Protection over" error 2014-08-11 22:22:01 +02:00
def a39c46ea1d Only extend timeout when code was entered 2014-08-09 18:08:00 +02:00
def f04537dee5 Working great 2014-08-09 17:53:24 +02:00