Loading .kdev4/libnetplus.kdev4 +11 −1 Changes for .kdev4/libnetplus.kdev4: 11 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x14\x00l\x00i\x00b\x00n\x00e\x00t\x00p\x00l\x00u\x00s) [CMake] Build Directory Count=1 Build Directory Count=2 Current Build Directory Index-Host System=0 Current Build Directory Index-Host-System=1 Loading @@ -16,5 +16,15 @@ Extra Arguments= Install Directory= Runtime=Host System [CMake][CMake Build Directory 1] Build Directory Path=/home/intranet.tuxist.de/jan.koester/Projects/libnetplus/build Build Type=Debug CMake Binary=/usr/bin/cmake CMake Executable=/usr/bin/cmake Environment Profile= Extra Arguments= Install Directory=/usr/local Runtime=Host-System [Project] VersionControlSupport=kdevgit src/event/iocp.cpp +19 −2 Changes for src/event/iocp.cpp: 19 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { bool RUNNING=true; bool WINAPI ConsoleHandler(DWORD event) { switch (event) { case CTRL_C_EVENT: RUNNING=false; return TRUE; default: return FALSE; } } enum IOState { IO_READ_STATE = 0, Loading Loading @@ -204,7 +215,7 @@ namespace netplus { public: EventWorker(int tid, ULONG_PTR args, EventWorkerArgs* eargs) { for (;;) { for (RUNNING) { OVERLAPPED* pOverlapped = nullptr; ULONG_PTR lpContext = 0; DWORD dwBytesTransfered = 0; Loading Loading @@ -302,6 +313,12 @@ namespace netplus { NetException exception; EventWorkerArgs eargs; if (!SetConsoleCtrlHandler(ConsoleHandler, true)) { NetException exp; exp[NetException::Critical] << "event: runEventloop couldn't create ConsoleHandler !"; throw exp; } HANDLE iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 0); if (!iocp) { Loading Loading @@ -367,7 +384,7 @@ namespace netplus { throw exp; } for (;;) { for (RUNNING) { // This is the correct blocking call. It waits for the g_hAcceptEvent to be signaled. DWORD dwResult = WSAWaitForMultipleEvents(1, &g_hAcceptEvent, FALSE, WSA_INFINITE, FALSE); Loading Loading
.kdev4/libnetplus.kdev4 +11 −1 Changes for .kdev4/libnetplus.kdev4: 11 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x14\x00l\x00i\x00b\x00n\x00e\x00t\x00p\x00l\x00u\x00s) [CMake] Build Directory Count=1 Build Directory Count=2 Current Build Directory Index-Host System=0 Current Build Directory Index-Host-System=1 Loading @@ -16,5 +16,15 @@ Extra Arguments= Install Directory= Runtime=Host System [CMake][CMake Build Directory 1] Build Directory Path=/home/intranet.tuxist.de/jan.koester/Projects/libnetplus/build Build Type=Debug CMake Binary=/usr/bin/cmake CMake Executable=/usr/bin/cmake Environment Profile= Extra Arguments= Install Directory=/usr/local Runtime=Host-System [Project] VersionControlSupport=kdevgit
src/event/iocp.cpp +19 −2 Changes for src/event/iocp.cpp: 19 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BLOCKSIZE 16384 namespace netplus { bool RUNNING=true; bool WINAPI ConsoleHandler(DWORD event) { switch (event) { case CTRL_C_EVENT: RUNNING=false; return TRUE; default: return FALSE; } } enum IOState { IO_READ_STATE = 0, Loading Loading @@ -204,7 +215,7 @@ namespace netplus { public: EventWorker(int tid, ULONG_PTR args, EventWorkerArgs* eargs) { for (;;) { for (RUNNING) { OVERLAPPED* pOverlapped = nullptr; ULONG_PTR lpContext = 0; DWORD dwBytesTransfered = 0; Loading Loading @@ -302,6 +313,12 @@ namespace netplus { NetException exception; EventWorkerArgs eargs; if (!SetConsoleCtrlHandler(ConsoleHandler, true)) { NetException exp; exp[NetException::Critical] << "event: runEventloop couldn't create ConsoleHandler !"; throw exp; } HANDLE iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 0); if (!iocp) { Loading Loading @@ -367,7 +384,7 @@ namespace netplus { throw exp; } for (;;) { for (RUNNING) { // This is the correct blocking call. It waits for the g_hAcceptEvent to be signaled. DWORD dwResult = WSAWaitForMultipleEvents(1, &g_hAcceptEvent, FALSE, WSA_INFINITE, FALSE); Loading