summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/NetworkSingleton.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-06-08libevent: Enable IOCP backend on windows (#4745)peterbell101-1/+4
2020-05-15Enable some more clang-tidy linter checks (#4738)peterbell101-2/+2
* Avoid inefficient AString -> c_str() -> AString round trip * Avoid redundant string init expressions * Avoid unnecessary return, continue, etc. * Add .clang-format to help with clang-tidy fix-its * Avoid unnecessary passing by value * Avoid unnecessary local copying * Avoid copying in range-for loops * Avoid over-complicated boolean expressions * Some violations missed by my local clang-tidy * Allow unnecessary continue statements * Add brackets * Another expression missed locally * Move BindingsProcessor call into clang-tidy.sh and add space * Fix pushd not found error * Different grouping of CheckBlockInteractionRate
2020-05-10Cleanup unneeded globals (#4736)peterbell101-1/+1
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell101-1/+1
Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-05-02Prefer static_cast to reinterpret_cast (#4223)peterbell101-1/+1
* Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2018-02-20Fix cUrlClient leak (#4125)peterbell101-7/+22
Fixes #4040 * The TCP connection is now shutdown after OnBodyFinished * Any open connections are closed when cNetworkSingleton::Terminate() is called. * Removed ownership cycles in cUrlClientRequest * Added a check to the test to ensure there are no leaks.
2017-06-22NetworkSingleton: Fixed a throw warning in VS2017. (#3792)Mattes D1-1/+1
Also fixed the misleading name.
2017-06-17NetworkSingleton: Fixed an object leak upon termination.Mattes D1-0/+1
2017-06-15Replace evdns with getaddrinfo and getnameinfo (#3766)peterbell101-87/+6
2016-12-12Use CMake's Android generators to crosscompileTiger Wang1-0/+15
2016-06-26Self tests (#3242)Mattes D1-5/+2
* SelfTests: Added a cEvent stress-test. * cNetwork: Fixed startup event hang. The original code used to hang with a ~ 1:50000 chance, because on Linux the cEvent was destroyed before its "Set()" returned.
2016-06-18cNetwork: Fixed possible hang when terminating immediately after init.Mattes D1-2/+19
2015-08-20Fixed and improved restartingTiger Wang1-22/+31
Restarts are now an actual, close-as-possible to application exit+reopen.
2015-07-23Fixed cNetworkSingleton's HasTerminated flag.Mattes D1-1/+4
Should fix random failures in Google-test.
2015-02-18NetworkSingleton: LibEvent thread is joined properly on server exit.Mattes D1-4/+2
2015-01-27Added network termination called at app exit.Mattes D1-11/+33
This fixes a crash in MSVC runtime caused by joining a thread in a global var's destructor.
2015-01-23cNetwork: Added self pointers to keep objects alive for callbacks.Mattes D1-0/+2
Ref.: http://forum.mc-server.org/showthread.php?tid=1700&pid=17947#pid17947
2015-01-22cNetwork: Fixed race conditions with lookups; proper shutdown.Mattes D1-38/+39
2015-01-22cNetwork: Split the main cpp file into several files.Mattes D1-45/+6
2015-01-22cNetwork: Split cNetworkSingleton to a separate file.Mattes D1-0/+281