Loading CMakeSettings.json +9 −26 Changes for CMakeSettings.json: 9 added lines, 26 removed lines. Original line number Diff line number Diff line { "configurations": [ { "name": "x64-Debug", "generator": "Ninja", "configurationType": "Debug", "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x64_x64" ] }, { "name": "x64-Release", "generator": "Ninja", "configurationType": "RelWithDebInfo", "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "buildRoot": "C:/Users/jan.koester/build_blogi/${name}", "installRoot": "C:/Users/jan.koester/build_blogi/${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x64_x64" ] }, "inheritEnvironments": [ "msvc_x64_x64" ], "variables": [ { "name": "x86-Debug", "generator": "Ninja", "configurationType": "Debug", "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x86" ], "variables": [] "name": "CMAKE_INSTALL_PREFIX", "value": "C:/Users/jan.koester/build_blogi/install", "type": "PATH" } ] } ] } No newline at end of file src/event/epoll.cpp +4 −3 Changes for src/event/epoll.cpp: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { bool RUNNING=true; std::atomic<bool> event::Running = true; std::vector<socket*> SSOCKETS; std::map<int,con*> CONNECTIONS; Loading Loading @@ -372,7 +373,7 @@ namespace netplus { int wait=0; // In EventWorker::EventWorker: while(RUNNING){ while(event::Running){ try { wait=pollptr.waitEventHandler(eargs->timeout); for(int i =0; i<wait; ++i){ Loading Loading @@ -496,7 +497,7 @@ namespace netplus { ccon.second->csock->close(); } } RUNNING=false; event::Running=false; break; default: break; Loading src/event/iocp.cpp +4 −4 Changes for src/event/iocp.cpp: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -54,12 +54,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { bool RUNNING=true; std::atomic<bool> event::Running = true; BOOL WINAPI ConsoleHandler(DWORD event) { switch (event) { case CTRL_C_EVENT: RUNNING=false; event::Running=false; WSACleanup(); return TRUE; default: Loading Loading @@ -217,7 +217,7 @@ namespace netplus { public: EventWorker(int tid, ULONG_PTR args, EventWorkerArgs* eargs) { while (RUNNING) { while (event::Running) { OVERLAPPED* pOverlapped = nullptr; ULONG_PTR lpContext = 0; DWORD dwBytesTransfered = 0; Loading Loading @@ -386,7 +386,7 @@ namespace netplus { throw exp; } while (RUNNING) { while (event::Running) { // This is the correct blocking call. It waits for the g_hAcceptEvent to be signaled. DWORD dwResult = WSAWaitForMultipleEvents(1, &g_hAcceptEvent, FALSE, _Timeout, FALSE); Loading src/event/kqueue.cpp +4 −3 Changes for src/event/kqueue.cpp: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -55,7 +55,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { std::atomic<bool> RUNNING(true); std::atomic<bool> event::Running = true; std::mutex POLL_HANDLER_MUTEX; std::vector<socket*> SSOCKETS; Loading Loading @@ -397,7 +398,7 @@ public: poll pollptr(eargs->ssocket, eargs->event, eargs->pollfd, eargs->timeout); int wait = 0; while (RUNNING) { while (event::Running) { try { wait = pollptr.waitEventHandler(eargs->timeout); for (int i = 0; i < wait; ++i) { Loading Loading @@ -499,7 +500,7 @@ public: ccon.second->csock->close(); } } RUNNING=false; event::Running=false; break; default: break; Loading src/eventapi.h +2 −2 Changes for src/eventapi.h: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -59,8 +59,8 @@ namespace netplus { virtual ~event(); static bool _Run; static bool _Restart; static bool Restart; static std::atomic<bool> Running; int threads; protected: Loading Loading
CMakeSettings.json +9 −26 Changes for CMakeSettings.json: 9 added lines, 26 removed lines. Original line number Diff line number Diff line { "configurations": [ { "name": "x64-Debug", "generator": "Ninja", "configurationType": "Debug", "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x64_x64" ] }, { "name": "x64-Release", "generator": "Ninja", "configurationType": "RelWithDebInfo", "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "buildRoot": "C:/Users/jan.koester/build_blogi/${name}", "installRoot": "C:/Users/jan.koester/build_blogi/${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x64_x64" ] }, "inheritEnvironments": [ "msvc_x64_x64" ], "variables": [ { "name": "x86-Debug", "generator": "Ninja", "configurationType": "Debug", "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x86" ], "variables": [] "name": "CMAKE_INSTALL_PREFIX", "value": "C:/Users/jan.koester/build_blogi/install", "type": "PATH" } ] } ] } No newline at end of file
src/event/epoll.cpp +4 −3 Changes for src/event/epoll.cpp: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { bool RUNNING=true; std::atomic<bool> event::Running = true; std::vector<socket*> SSOCKETS; std::map<int,con*> CONNECTIONS; Loading Loading @@ -372,7 +373,7 @@ namespace netplus { int wait=0; // In EventWorker::EventWorker: while(RUNNING){ while(event::Running){ try { wait=pollptr.waitEventHandler(eargs->timeout); for(int i =0; i<wait; ++i){ Loading Loading @@ -496,7 +497,7 @@ namespace netplus { ccon.second->csock->close(); } } RUNNING=false; event::Running=false; break; default: break; Loading
src/event/iocp.cpp +4 −4 Changes for src/event/iocp.cpp: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -54,12 +54,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { bool RUNNING=true; std::atomic<bool> event::Running = true; BOOL WINAPI ConsoleHandler(DWORD event) { switch (event) { case CTRL_C_EVENT: RUNNING=false; event::Running=false; WSACleanup(); return TRUE; default: Loading Loading @@ -217,7 +217,7 @@ namespace netplus { public: EventWorker(int tid, ULONG_PTR args, EventWorkerArgs* eargs) { while (RUNNING) { while (event::Running) { OVERLAPPED* pOverlapped = nullptr; ULONG_PTR lpContext = 0; DWORD dwBytesTransfered = 0; Loading Loading @@ -386,7 +386,7 @@ namespace netplus { throw exp; } while (RUNNING) { while (event::Running) { // This is the correct blocking call. It waits for the g_hAcceptEvent to be signaled. DWORD dwResult = WSAWaitForMultipleEvents(1, &g_hAcceptEvent, FALSE, _Timeout, FALSE); Loading
src/event/kqueue.cpp +4 −3 Changes for src/event/kqueue.cpp: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -55,7 +55,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { std::atomic<bool> RUNNING(true); std::atomic<bool> event::Running = true; std::mutex POLL_HANDLER_MUTEX; std::vector<socket*> SSOCKETS; Loading Loading @@ -397,7 +398,7 @@ public: poll pollptr(eargs->ssocket, eargs->event, eargs->pollfd, eargs->timeout); int wait = 0; while (RUNNING) { while (event::Running) { try { wait = pollptr.waitEventHandler(eargs->timeout); for (int i = 0; i < wait; ++i) { Loading Loading @@ -499,7 +500,7 @@ public: ccon.second->csock->close(); } } RUNNING=false; event::Running=false; break; default: break; Loading
src/eventapi.h +2 −2 Changes for src/eventapi.h: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -59,8 +59,8 @@ namespace netplus { virtual ~event(); static bool _Run; static bool _Restart; static bool Restart; static std::atomic<bool> Running; int threads; protected: Loading