Loading src/event/iocp.cpp +8 −2 Changes for src/event/iocp.cpp: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -136,7 +136,13 @@ namespace netplus { g_eventapi->ConnectEvent(pClientContext->CurCon, tid, args); try { pClientContext->CurCon->csock->recvData(nullptr,0,0); std::shared_ptr<char[]> buf(new char[BLOCKSIZE], std::default_delete<char[]>()); size_t recv = pClientContext->CurCon->csock->recvData(buf.get(), BLOCKSIZE, 0); pClientContext->CurCon->RecvData.append(buf.get(), recv); g_eventapi->RequestEvent(pClientContext->CurCon, tid, args); } catch (NetException& e) { std::cerr << e.what() << std::endl; if (e.getErrorType() != NetException::Note) Loading Loading @@ -290,7 +296,7 @@ namespace netplus { pClientContext->CurCon->csock->fd(), &pClientContext->CurCon->csock->_Overlapped, &dwBytes, false, true, (LPDWORD)&flags ); Loading src/windows/tcp.cpp +2 Changes for src/windows/tcp.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -237,6 +237,8 @@ size_t netplus::tcp::recvData(void* data, unsigned long size,int flags){ exception[NetException::Error] << "Socket recvdata failed on Socket: " << (int)_Socket << " ErrorMsg: " << lerror; throw exception; } else { return 0; } } Loading Loading
src/event/iocp.cpp +8 −2 Changes for src/event/iocp.cpp: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -136,7 +136,13 @@ namespace netplus { g_eventapi->ConnectEvent(pClientContext->CurCon, tid, args); try { pClientContext->CurCon->csock->recvData(nullptr,0,0); std::shared_ptr<char[]> buf(new char[BLOCKSIZE], std::default_delete<char[]>()); size_t recv = pClientContext->CurCon->csock->recvData(buf.get(), BLOCKSIZE, 0); pClientContext->CurCon->RecvData.append(buf.get(), recv); g_eventapi->RequestEvent(pClientContext->CurCon, tid, args); } catch (NetException& e) { std::cerr << e.what() << std::endl; if (e.getErrorType() != NetException::Note) Loading Loading @@ -290,7 +296,7 @@ namespace netplus { pClientContext->CurCon->csock->fd(), &pClientContext->CurCon->csock->_Overlapped, &dwBytes, false, true, (LPDWORD)&flags ); Loading
src/windows/tcp.cpp +2 Changes for src/windows/tcp.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -237,6 +237,8 @@ size_t netplus::tcp::recvData(void* data, unsigned long size,int flags){ exception[NetException::Error] << "Socket recvdata failed on Socket: " << (int)_Socket << " ErrorMsg: " << lerror; throw exception; } else { return 0; } } Loading