summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/NetworkSingleton.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
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