summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2021-02-08Fix: mention our websites with https:// (instead of http://) (#8657)Patric Stout
It is 2021. Nobody should advertise http anymore. Not even us.
2021-02-05Codechange: Apply coding style (#8640)SamuXarick
* Fix: Missing or needed spaces * Codechange: Remove space * Codechange: Remove space * Codechange: More missing spaces * Codechange: Missing spaces * Codechange: Remove space * Codechange: Remove space
2021-01-31Fix 2db88953: default Network Server List sorter put compatible servers in ↵Patric Stout
wrong order (#8626) If a server is compatible, it falls back to sorting by clients. This used to be in reverse, so full servers are on top. With the codechange commit, this was removed by accident, and as such empty servers were on top. This is silly.
2021-01-22Change: Apply some consistency to singleplayer related commentsglx22
2021-01-08Fix: Start the inactivity-timeout for the content server only after the ↵frosch
connection has been established. (#8530) When connecting took long due to the first N resolve-addresses timing out, OpenTTD would immediately close the connection, without sending anything.
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2021-01-05Change: move "give money" from client-list to company windowPatric Stout
This is a much better location for this button, as you send money from one company to another company, not from player to player. This is based on work done by JGRPP in: https://github.com/JGRennison/OpenTTD-patches/commit/f82054339124cc6b89c5f4f9dac2d9da62f0108b and surrounding commits, which took the work from estys: https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311 We did modify it to fix several bugs and clean up the code while here anyway. The callback was removed, as it meant a modified client could prevent anyone from seeing money was transfered. The message is now generated in the command itself, making that impossible.
2021-01-02Fix: prevent clients making emergency saves twice if server disconnects (#8477)Patric Stout
This was clearly overlooked during the initial implementation.
2020-12-27Fix b408fe7: Don't try to construct a std::string from nullptrCharles Pigott
2020-12-27Codechange: Even more std::string usage in file IO.Michael Lutz
2020-12-27Codechange: Convert some more FIO functions to take std::string.Michael Lutz
2020-12-27Codechange: Use std::string in FIO search path handling.Michael Lutz
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-12-25Codechange: Rename strings to match their usage.frosch
2020-12-25Change: Remove the LAN/Internet combobox from the server list in favour of ↵frosch
adding two separate search buttons.
2020-12-22Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470)Jonathan G Rennison
Check if the job is still running two date fract ticks before it is due to join, and if so pause the game until its done. When loading a game, check if the game would block immediately due to a job which is scheduled to be joined within two date fract ticks, and if so pause the game until its done. This avoids the main thread being blocked on a thread join, which appears to the user as if the game is unresponsive, as the UI does not repaint and cannot be interacted with. Show if pause is due to link graph job in status bar, update network messages. This does not apply for network clients.
2020-12-16Change: send network error to the server before making an emergency save (#8387)Pavel Stupnikov
2020-12-15Fix: Remove unnessary reference to suppress warning (#8337)Byoungchan Lee
Apple Clang version 12 (bundled with Xcode 12) complaints about copying small objects in range loop (-Wrange-loop-analysis introduced by -Wall). This warning can be easily avoided by removing the reference from the const pointer type.
2020-12-15Fix: workarounds for two emscripten bugs in the network stackPatric Stout
2020-12-15Add: support for emscripten (play-OpenTTD-in-the-browser)Patric Stout
Emscripten compiles to WASM, which can be loaded via HTML / JavaScript. This allows you to play OpenTTD inside a browser. Co-authored-by: milek7 <me@milek7.pl>
2020-07-09Fix: Thread unsafe use of SendPacket for PACKET_SERVER_MAP_SIZEJonathan G Rennison
NetworkTCPSocketHandler::SendPacket is not thread safe and may not be used concurrently from multiple threads without suitable locking
2020-06-27Doc: Acknowledge integer type mismatch in certain admin packets using ↵duck
AdminUpdateType (#8238)
2020-06-27Fix: Compiler warnings about memsetting non-trivial classesCharles Pigott
2020-06-21Fix: Thread unsafe use of NetworkAddress::GetAddressAsStringJonathan G Rennison
Remove static buffer form of NetworkAddress::GetAddressAsString. This is used in multiple threads concurrently, and is not thread-safe. Replace it with a form returning std::string.
2020-06-18Fix: Racy use of flags in TCPConnecter::CheckCallbacksJonathan G Rennison
conected and aborted flags are used concurrently from multiple threads.
2020-06-05Add: introduce CMake for project managementPatric Stout
CMake works on all our supported platforms, like MSVC, Mingw, GCC, Clang, and many more. It allows for a single way of doing things, so no longer we need shell scripts and vbs scripts to work on all our supported platforms. Additionally, CMake allows to generate project files for like MSVC, KDevelop, etc. This heavily reduces the lines of code we need to support multiple platforms from a project perspective. Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-01Fix #8024: make online content gui more responsive while loadingYexo
Previously the internal content list was invalidated and sorted for every new item added. Now the sorting is delayed until the GUI is drawn, which means we only sort once per GUI tick. Since the amount of incoming items per GUI tick is not controlled by the GUI but rather by network speed, we were previously doing a lot of duplicate work per tick, causing the mouse cursor to lag while the list was initialized.
2020-05-21Codechange: Replace custom linked list for GRF texts with STL vectors and ↵Michael Lutz
strings.
2020-05-07Fix #8117: Memory leak in admin port (#8122)glx22
2020-04-05Fix #8060, 5880f14: Restore admin network API compatibility.frosch
2020-02-23Codechange: Limit field width to avoid sscanf crashQuipyowert2
2020-02-08Fix #7976: Don't kick the client doing the rconglx
2020-02-04Feature #7756: Allow server to supply a reason to kicked/banned clientsBjarni Thor
This commit adds the missing feature of allowing the server owner to provide a reason for kicking/banning a client, which the client sees in a pop-up window after being kicked. The implementation extends the network protocol by adding a new network action called NETWORK_ACTION_KICKED that is capable of having an error string, unlike the other network error packages. Additionally, the kick function broadcasts a message to all clients about the kicked client and the reason for the kick.
2020-01-12Feature: Auto-restart loads the original resources againBerbe
If the game was started loading a savegame or scenario, auto-restart will load a new random map. This is inconsistent with the case in which a heightmap was loaded, as in that case the heightmap is kept as a basis for a new game. This proposal solves this heterogeneity be considering the originally loaded resource shall be kept, hence savegames & scenarios shall be reloaded
2020-01-07Codechange: Remove std::function from Pool iteration wrapperJonathan G Rennison
Add a separate template wrapper for filtered iteration
2019-12-21Fix: unused variable warningsglx
2019-12-21Codechange: Replace FOR_ALL_TOWNS with range-based for loopsglx
2019-12-21Codechange: Replace vehicle related FOR_ALL with range-based for loopsglx
2019-12-21Codechange: Replace network related FOR_ALL with range-based for loopsglx
2019-12-21Codechange: Replace station related FOR_ALL with range-based for loopsglx
2019-12-21Codechange: Replace FOR_ALL_COMPANIES with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-10-07Fix: [Cygwin] Fix missing AI_ADDRCONFIG declarationJoe Stringer
Fixes the following complaints: src/network/core/address.cpp: In member function 'const sockaddr_storage* NetworkAddress::GetAddress()': src/network/core/address.cpp:134:55: error: 'AI_ADDRCONFIG' was not declared in this scope this->Resolve(this->address.ss_family, SOCK_STREAM, AI_ADDRCONFIG, nullptr, ResolveLoopProc); Signed-off-by: Joe Stringer <joe@wand.net.nz>
2019-09-30Fix: clang and MSVC warnings (glx)Charles Pigott
2019-09-30Fix: GCC9's warnings about deprecated implicit assignment operatorsCharles Pigott
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-05-04Codechange: replace grow() usage in ↵glx
ClientNetworkContentSocketHandler::OnReceiveData()
2019-04-29Codechange: Remove Company/OwnerByte typesCharles Pigott
2019-04-27Fix #7165: Missed another 'Append() --> push_back()' replacement (#7548)PeterN
2019-04-25Fix dcb2571: Missing override keywordsNiels Martin Hansen