summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2021-12-20Fix #9756: Network command unpack proc was not generated in all cases.Michael Lutz
The case where the callback proc takes all command results but not any of the command parameters was not handled properly.
2021-12-20Change: [Admin] Bump admin port protocol due to command changes.Michael Lutz
docs/admin_network.md promised that information in an admin packet is never removed. It does allow the possibility of using a new packet type for changed data in combination with a bump of the admin port version. As the recent command handling changes modified the contents of ADMIN_PACKET_SERVER_CMD_LOGGING, do exactly that.
2021-12-16Codechange: Don't generate CommandPacket unpack functions for invalid ↵Michael Lutz
cmd/callback combinations. If the arguments of the callback proc don't match with the command parameters, we can't do the proper command execution anyway. As such, don't even generate an unpack function in the first place, saving a bit of unnecessary code bloat. Validate on receive that the cmd/callback combination is supported, rejecting clients that try to send invalid values.
2021-12-16Codechange: Add support for additional command result values.Michael Lutz
2021-12-16Codechange: Pass unpacked command arguments to command callbacks (except ↵Michael Lutz
Script).
2021-12-16Codechange: Template the command callback function type to allow unpacked ↵Michael Lutz
arguments.
2021-12-16Codechange: Un-bitstuff all remaining commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).Michael Lutz
2021-12-16Codechange: Template DoCommandPInternal.Michael Lutz
2021-12-16Codechange: Template DoCommandP to automagically reflect the parameters of ↵Michael Lutz
the command proc. When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
2021-12-16Change: [Network] Transfer command data as serialized byte stream without ↵Michael Lutz
fixed structure. The data will be transmitted as the length followed by the serialized data. This allows the command data to be different for every command type in the future.
2021-12-16Codechange: Move command callback declarations to the cmd header files.Michael Lutz
2021-12-16Codechange: Untangle command code, flags and error string for DoCommand*.Michael Lutz
2021-12-16Codechange: Move command arguments to the back of the networked command ↵Michael Lutz
function calls.
2021-12-05Codechange: do not use all upper case enumerators in a scoped enumRubidium
2021-12-04Fix #9730: [Network] connections can use an invalid socket due to a race ↵Patric Stout
condition A race condition happens when an IPv6 connection takes more than 250ms to report an error, but does return before the IPv4 connection is established. In result, an invalid socket might be used for that connection.
2021-12-04Codechange: ensure OnConnect() always gets called with a valid socket (#9729)Patric Stout
This should already be the case, but now assert()s will tell us if this isn't.
2021-11-06Fix 55a11710: Curly braces need to be double-escaped for (std::)fmt.Michael Lutz
2021-11-03Fix 3a1a915: Every 16th client never reconnects after server restartdP
2021-10-19Fix #9624: compilation with RANDOM_DEBUGglx22
2021-10-17Change: Don't use 'server address' string in server list when displaying an ↵Charles Pigott
invite code (#9615)
2021-10-03Add: [Network] Keep the refresh button in lowered state while refreshing (#9600)Patric Stout
This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
2021-09-19Add: [Network] external chat messages for remote admins (#9563)dP
2021-09-19Add: [Network] On join, log the ClientID + IP + Name clearly (#9558)Patric Stout
Additionally, reword the disconnect to match connect / join messages. Co-authored-by: Berbe <4251220+Berbe@users.noreply.github.com>
2021-09-11Add: support filtering content entries for patchpacks (#9541)Patric Stout
This changes nothing for us, but allows patchpacks to add the right pieces of code to start filtering content entries on patchpack only entries.
2021-09-09Fix #9535: Maintain a reverse dependency map of network content (#9538)Jonathan G Rennison
Fixes performance issues with dependency lookup when retrieving content list from the content server.
2021-09-05Fix: use-after-free after ↵Patric Stout
ClientNetworkCoordinatorSocketHandler::CloseAllConnections() (#9534) The function clears all stun-handlers. This causes all of those objects to be destroyed. A handler can have a pending connecter, which was only killed in case CloseConnection() was called. This is never the case when the object is destroyed. In result, the connecter could finish and cause a use-after-free by calling into the (now deleted) handler.
2021-09-01Fix #9388: thread unsafe use of NetworkAdminConsole/IConsolePrintRubidium
2021-08-31Fix a2051bad: SendCmdNames only sent one name per packet (#9528)Patric Stout
2021-08-28Fix: when DNS didn't resolve any IPs, the debug message was misleading (#9519)Patric Stout
2021-08-23Fix: [Network] show query errors in the server listing instead of error ↵Patric Stout
popup (#9506) When you are query several servers at once, it is rather unclear for which server you got a popup. Instead, show any errors on the server itself. This is only true for the query-part. Joining a server still gives an error popup to tell you about any issue.
2021-08-23Fix #9490: [Network] a full server couldn't be queried either (#9508)Patric Stout
You can now still query a full server, as long as the maximum amount of allowed connections isn't reached. This means that as long as there are not 255 clients connected to a server, you can always connect to query.
2021-08-23Fix #9501: [Network] crash when more than one game-info query was pending ↵Patric Stout
(#9502)
2021-08-23Fix c4b700f1: remove left-over debug statement (#9510)Patric Stout
2021-08-23Fix: [Network] don't show GameScript " (v0)" for old servers (#9507)Patric Stout
Old servers don't tell the GameScript they are running, so nothing should be shown. All values in NetworkGameInfo initialize as 0/empty, except for GS version. Someone has to be different from the rest, I guess.
2021-08-21Fix: [Network] crash when last-joined server that is no longer available (#9503)Patric Stout
If you update the server-list while not having last-joined selected and it is no longer available, the game crashed.
2021-08-19Fix d9c1d18f2: Wrong format string for console disconnect message.Michael Lutz
2021-08-18Fix #9492: show for what server a relay session is being created (#9494)Patric Stout
Currently it says "the server" which is a bit ambigious. Be more specific.
2021-08-18Fix: typo in the word "spectator" (tnx Heiki) (#9496)Patric Stout
2021-08-17Fix 6acf204d: crash when showing coordinator-error-messages (#9488)Patric Stout
2021-08-17Fix: report reuse of invite-code and switch to local game-type (#9487)Patric Stout
This prevents two servers battling for the same invite-code. Now the last one wins.
2021-08-16Fix: connecting with the same name thrice hangs the server (#9485)dP
2021-08-15Add: open Online Players GUI on starting/joining a server (#9479)Patric Stout
2021-08-14Remove: COMPANY_INFO packets and related code (#9475)Patric Stout
2021-08-14Feature: make "join game" button join the game, instead of first showing a ↵Patric Stout
lobby window (#9467) Nobody really paid attention to the lobby window, and it completely missed its purpose. Most people don't even wait for companies to show up, but just hit "New Company". This in turn means people create a lot of unneeded companies, while they "just want to watch the game" or join another company. Instead, "Join Game" now just joins the game as spectators.
2021-08-14Fix 508e465b: network servers didn't show invite-code / connection-type in ↵Patric Stout
Online Players GUI (#9478) The selector selects the first widget, which by accident was now only the server visibility.
2021-08-14Add: synchronize server name to clients and display in Online Players GUI ↵Patric Stout
(#9472)
2021-08-10Change: remove the ability to control "max spectators" (#9466)Patric Stout
Soon we will make "join game" join the game as spectator first, so limiting the amount of spectators makes no sense anymore in that context. Not sure it ever did make sense.
2021-07-21Cleanup: remove some references to the old master-serverRubidium
2021-07-21Fix: crash when joining a server again after a TCP disconnect (#9453)Patric Stout
"my_client" wasn't always free'd when a game ended. "my_client" keeps a reference inside the PT_NCLIENT pool. The rest of the code assumes that when you are not in a game, it can freely reset this pool. In result: several ways to trigger a use-after-free.