summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2021-04-27Add: ability to retrieve game info from server over TCPPatric Stout
2021-04-27Codechange: be explicit in pointer comparisonsPatric Stout
2021-04-27Codechange: move all NetworkGameInfo related functions to a single filePatric Stout
It currently was a bit scattered over the place. Part of NetworkGameInfo is also the GRF Identifiers that goes with it.
2021-04-27Change: [Network] lower TCP connect() timeout to 3s (#9112)Patric Stout
Currently we use default OS timeout for TCP connections, which is around 30s. 99% of the users will never notice this, but there are a few cases where this is an issue: - If you have a broken IPv6 connection, using Content Service is first tried over IPv6. Only after 30s it times out and tries IPv4. Nobody is waiting for that 30s. - Upcoming STUN support has several methods of establishing a connection between client and server. This requires feedback from connect() to know if any method worked (they have to be tried one by one). With 30s, this would take a very long time. What is good to mention, is that there is no good value here. Any value will have edge-cases where the experience is suboptimal. But with 3s we support most of the stable connections, and if it fails, the user can just retry. On the other side of the spectrum, with 30s, it means the user has no possibility to use the service. So worst case we annoy a few users with them having the retry vs annoying a few users which have no means of resolving the situation.
2021-04-27Cleanup: remove #ifdefs for compiling the old content serverrubidium42
2021-04-27Codechange: [Network] Do not leak os_abstraction.h via fios.hrubidium42
2021-04-27Codechange: [Network] Do not leak os_abstraction.h via network_funcrubidium42
2021-04-27Change: [Network] Use string error messages instead of numeric error numbers ↵rubidium42
that need to be looked up
2021-04-27Fix: [Network] errno and strerror do not handle network errors on Windowsrubidium42
2021-04-26Fix 8a95fee4: Missing initialiser in Packet constructorCharles Pigott
2021-04-25Change: [Network] Remove now defunct savegame transfer packet limiterrubidium42
2021-04-25Change: use 32 KiB packets to send requests to the content serverRubidium
2021-04-25Change: use 32 KiB packets to transfer the savegameRubidium
2021-04-25Codechange: differentiate between UDP, TCP and compatibility MTU valuesRubidium
2021-04-25Codechange: allow different limits in packet sizesRubidium
2021-04-25Fix: [Network] Prevent stalling save game transfer when compression is slowrubidium42
2021-04-24Change: use icons to indicate you/host in Online Players GUIPatric Stout
2021-04-24Add: move "New Company" inside the Online Players GUIPatric Stout
2021-04-24Change: track hover position on Online Players GUIPatric Stout
Especially if there are many players online, trying to chat with the right one can be a visual challenge. This can be solved by highlighting the row you are on. This visual cue is often enough for humans to find the right row.
2021-04-24Add: ask for confirmation on admin actions in network gamesPatric Stout
2021-04-24Add: admin menu for companies in multiplayer gamesPatric Stout
You can now easily do: - a password reset (unlock) - remove an empty company (reset company)
2021-04-24Feature: rework in-game Online Players GUIPatric Stout
The GUI now more clearly shows some basic information about the server you joined, your client name (and the ability to change it), and what players are in which company. It also contains useful buttons to press to join companies, chat with other people, and for admins to kick/ban people. Additionally, renamed "advertised" to "visibility"; this has to do with future additions, but also because it is more clear in wording.
2021-04-24Codechange: use std::vector instead of a fixed size array for PacketsRubidium
2021-04-24Codechange: add accessor for the packet type to Packet and make the internal ↵Rubidium
state of Packet private
2021-04-24Codechange: remove public access to the next pointer in PacketRubidium
2021-04-24Codechange: encapsulate reading the size of a PacketRubidium
2021-04-24Codechange: encapsulate the logic about how many bytes can be sent from a ↵Rubidium
buffer in to a Packet
2021-04-24Codechange: move the logic shrinking of the packets into the Packet itselfRubidium
2021-04-24Codechange: encapsulate writing data from Packets into sockets/files/buffers ↵Rubidium
to prevent packet state modifications outside of the Packet
2021-04-24Codechange: encapsulate reading data from sockets into Packets to prevent ↵Rubidium
packet state modifications outside of the Packet
2021-04-24Codechange: move logic whether there is enough space in a packet to write ↵Rubidium
data into the Packet
2021-04-24Codechange: move more logic about packet size validity and reading into PacketRubidium
2021-04-24Add: [Network] Validate the client name when receiving one from the serverrubidium42
This so names from other clients are known valid in the client as well, instead allowing some compromised/bad server to potentially crash clients upon certain expectations.
2021-04-24Add: [Network] Validate the client name server side, so no clients with ↵rubidium42
invalid names can actually join
2021-04-24Change: [Network] Prevent invalid client names being sent to the server when ↵rubidium42
changing it using the console/settings
2021-04-24Feature: [Network] Ensure players fill in a name instead of defaulting to ↵rubidium42
"Player"
2021-04-24Codechange: [Network] Introduce function to validate the client namerubidium42
2021-04-22Codechange: Use new widget features on chat message box.Peter Nelson
2021-04-21Codechange: merge duplicated logic to scroll in lists by key into a single ↵Rubidium
function
2021-04-20Doc: server name doesn't need to be advertised to be validPatric Stout
Strictly seen the comment is true, as it says 'e.g.', but it is misleading. The server name is just that: the name of the server as configured. No need to mention advertising.
2021-04-20Codechange: remove always-empty "address" from NetworkContentSocketHandlerPatric Stout
When ever you saw this debug lines (which you never should), they showed an empty address. It is also not very useful to have, as it always points to a known server anyway.
2021-04-20Codechange: split ParseConnectionString into two functionsPatric Stout
One also looks for a company, the other doesn't. There were more uses of the latter than the first, leaving very weird code all over the place.
2021-04-20Remove: "language" field from server/clientPatric Stout
The original idea was that people could find a server they could talk in their native language on. This isn't really used in that way. There are several reasons for removing this: - the client also sends his "language" to the server, but nothing is doing anything with this. - flags are a bad way to represent languages, and over the years we had several (rightfully) complaints about this. - most servers have their language set to "All", and prefix the servername with the language it is about. This is a much more efficient way to do the same. All in all, this feature should go back to the drawing board. Maybe it could work in another form, but this form is not it.
2021-04-20Remove: "map_name" from server announcements / listingPatric Stout
The idea back in the days was nice, but it never resulted in anything useful. Most servers either read "(loaded game)" or "Random Map", neither being useful. It was meant for heightmaps, so you could find a server that was using a specific one .. but there are many things wrong with that idea. Mostly, servers tend to save and load savegames from time to time, after which the original heightmap used was lost. All in all, removing map_name all together is just better.
2021-04-17Fix #9042: Make multiplayer server list height auto-fill window.Peter Nelson
#9042 did not fix all combinations of scaling options. This additional change makes the server list automatically fill available height.
2021-04-16Feature: Show previous chat history when the chat message box is openPeter Nelson
2021-04-16Codechange: Use std::deque for chat history instead of fixed arrayPeter Nelson
2021-04-16Fix: Sizing of Multiplayer server list incorrect when GUI zoom doesn't match ↵Peter Nelson
Font zoom. The server information panel was scaled by GUI scale, which could result in a panel that is longer than the server list. This height difference is then maintained when the window is resized to fill the screen. Instead, specify the minimum size by number of text lines and (summed total) padding.
2021-04-12Change: warn the user about the resolving of an address being extra very slowRubidium
2021-04-12Fix: split the UDP blocking of sockets to only the socket involved, and when ↵Rubidium
another thread is busy do not attempt to process the packets of that socket