Loading src/event/iocp.cpp +8 −6 Changes for src/event/iocp.cpp: 8 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -274,6 +274,8 @@ namespace netplus { buffer buf(BLOCKSIZE); size_t recv = curCon->csock->recvData(buf, 0); std::cout.write(buf.data.buf, recv); std::copy(buf.data.buf,buf.data.buf+buf.size,std::back_inserter(curCon->RecvData)); eargs->event->RequestEvent(*curCon, tid, args); Loading @@ -281,27 +283,27 @@ namespace netplus { pClientContext->State = IO_WRITE_STATE; }break; } pClientContext->cltmtx.unlock(); } catch (NetException& e) { std::cerr << e.what() << std::endl; if (e.getErrorType() != NetException::Note) { if (e.getErrorType() == NetException::Note) { WSAResetEvent(pOverlapped->hEvent); } WSACloseEvent(pOverlapped->hEvent); eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); delete pClientContext; lpContext = 0; }else{ pClientContext->cltmtx.unlock(); } continue; } catch (...) { std::cerr << "unknown error close coonection !" << std::endl; WSACloseEvent(pOverlapped->hEvent); eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); delete pClientContext; lpContext = 0; continue; } pClientContext->cltmtx.unlock(); } // for } }; Loading Loading
src/event/iocp.cpp +8 −6 Changes for src/event/iocp.cpp: 8 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -274,6 +274,8 @@ namespace netplus { buffer buf(BLOCKSIZE); size_t recv = curCon->csock->recvData(buf, 0); std::cout.write(buf.data.buf, recv); std::copy(buf.data.buf,buf.data.buf+buf.size,std::back_inserter(curCon->RecvData)); eargs->event->RequestEvent(*curCon, tid, args); Loading @@ -281,27 +283,27 @@ namespace netplus { pClientContext->State = IO_WRITE_STATE; }break; } pClientContext->cltmtx.unlock(); } catch (NetException& e) { std::cerr << e.what() << std::endl; if (e.getErrorType() != NetException::Note) { if (e.getErrorType() == NetException::Note) { WSAResetEvent(pOverlapped->hEvent); } WSACloseEvent(pOverlapped->hEvent); eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); delete pClientContext; lpContext = 0; }else{ pClientContext->cltmtx.unlock(); } continue; } catch (...) { std::cerr << "unknown error close coonection !" << std::endl; WSACloseEvent(pOverlapped->hEvent); eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); delete pClientContext; lpContext = 0; continue; } pClientContext->cltmtx.unlock(); } // for } }; Loading