summaryrefslogtreecommitdiff
path: root/src/network/core
AgeCommit message (Collapse)Author
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-05-07Fix #8117: Memory leak in admin port (#8122)glx22
2019-12-21Codechange: Replace network related FOR_ALL 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: GCC9's warnings about deprecated implicit assignment operatorsCharles Pigott
2019-04-27Fix #7165: Missed another 'Append() --> push_back()' replacement (#7548)PeterN
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Codechange: If something is a vector of strings, use a vector of strings ↵Michael Lutz
instead of an AutoFreeSmallVector.
2019-04-06Codechange: Replace custom thread code with C++11 thread objects.Michael Lutz
We assume a conforming C++11 compiler environment that has a valid <thread>-header. Failure to run a real thread is handled gracefully.
2019-03-26Fix #7165: Missed 'Append() --> push_back()' replacementstormcone
2019-03-26Cleanup: Remove unused size template parameters from SmallMap and ↵Henry Wilson
Auto[Free|Delete]SmallVector
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replaced SmallVector::Erase() with std::vector::erase()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() const with suitable alternativesHenry Wilson
The use of std::none_of in network/core/host.cpp is driven by the non-const comparison operator use by NetworkAddress. A future commit should address the const_casts in that class to ensure const-correctness.
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-24Codechange: Use override keyword in networking classes.peter1138
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries. Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF. A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used. With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box. All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.
2019-03-05Fix: warnings when compiling for a recent version of HaikuPatric Stout
This might break older Haiku versions, but it is hard to tell.
2019-03-05Remove: BeOS support (deprecated by Haiku)Patric Stout
In 10 years there is no commit to change how BeOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), BeOS is no longer support. SDL2 suggests to use Haiku instead of BeOS.
2019-03-05Remove: MorphOS / AmigaOS supportPatric Stout
In 10 years there is no commit to change how MorphOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), MorphOS is no longer support. There is an SDL2 port for MorphOS, but it is not maintained by upstream SDL2, and nobody can currently test it out. If anyone wants to re-add MorphOS, please do (revert this patch, fix the problems, and create a Pull Request). If you need any help doing so, let us know! It is not that we don't like MorphOS, it is that we don't have anyone fixing the problems :(
2019-02-12Fix: CompanyEconomy documentationThomas den Hollander
Company income was described as an unsigned integer, but it should be signed.
2019-02-03Change: Make a shortened network revision string for use in server queriesNiels Martin Hansen
2019-02-03Change: Increase NETWORK_REVISION_LENGTH to 33 bytesNiels Martin Hansen
2019-01-17Codechange: Remove unnecessarily defined functions under MinGWCharles Pigott
2018-12-27Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined ↵glx
macro _WIN32
2018-06-23Feature #986: Automatic save when losing connection to a network gameNiels Martin Hansen
2018-04-30Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation.J0an Josep
2018-04-29Remove: PSP supportPatric Stout
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2017-01-14(svn r27729) -Codechange: Do not count static NewGRF when checking for the ↵frosch
maximum number of NewGRFs in a game. -Codechange: Remove LAST_GRF_SLOT and MAX_NEWGRFS. Now NETWORK_MAX_GRF_COUNT is the only constant to specify the maximum number of non-static NewGRF. -Codechange: Increase the number of file slots, effectively increasing the maximum number of static NewGRF and baseset GRFs.
2016-10-30(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) ↵frosch
threads. (JGR)
2014-12-24(svn r27092) -Fix/Add [FS#6186]: Compilation on OS/2 (smedles)frosch
2014-04-25(svn r26509) -Codechange: replace strdup with stredup (the latter ensures ↵rubidium
the return is not NULL)
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-11-23(svn r26057) -Fix: a number of possibly uninitialised variablesrubidium
2013-11-22(svn r26056) -Fix: a number of possibly uninitialised variablesrubidium
2013-11-22(svn r26046) -Fix: handle a number of failure conditions from methods called ↵rubidium
in the network code
2013-07-13(svn r25597) -Fix [FS#5635]: [Content] When the server closed the ↵rubidium
connection, the client would for eternity try to read a packet and never timeout making it impossible to reconnect
2013-07-13(svn r25593) -Cleanup: remove a few stale #definesrubidium
2013-07-12(svn r25590) -Codechange: Align doxygen comments againplanetmaker
2013-07-12(svn r25589) -Fix [FS#5646]: Ensure that sent and received length of json ↵planetmaker
strings are the same (based on patch by Xaroth)
2013-07-11(svn r25588) -Feature [FS#5643]: PING and PONG packets for admin port (Xaroth)planetmaker
2013-07-11(svn r25587) -Add FS#5643: Conclude rcon output sent to admin clients with ↵planetmaker
an RCON_END packet (Xaroth)