Loading src/event/iocp.cpp +18 −4 Original line number Diff line number Diff line Loading @@ -519,8 +519,6 @@ namespace netplus { INFINITE ); std::cout << "test2" << std::endl; lpIOContext = (poll::PPER_IO_CONTEXT)lpOverlapped; switch (lpIOContext->IOOperation) { Loading Loading @@ -615,7 +613,13 @@ namespace netplus { } args->event->ConnectEvent(lpPerSocketContext->CurCon, tid, args); std::copy(buffRecv.buf,buffRecv.buf+buffRecv.len,std::back_inserter(lpPerSocketContext->CurCon->RecvData)); args->event->RequestEvent(lpPerSocketContext->CurCon, tid, args); if(!lpPerSocketContext->CurCon->SendData.empty()) lpAcceptSocketContext->pIOContext->IOOperation = poll::ClientIoWrite; // //Time to post another outstanding AcceptEx // Loading Loading @@ -651,11 +655,17 @@ namespace netplus { delete lpAcceptSocketContext->CurCon->csock; lpAcceptSocketContext->CurCon->csock = nullptr; } std::copy(buffRecv.buf, buffRecv.buf + buffRecv.len, std::back_inserter(lpPerSocketContext->CurCon->RecvData)); args->event->RequestEvent(lpPerSocketContext->CurCon, tid, args); break; case poll::ClientIoWrite: std::copy(lpPerSocketContext->CurCon->SendData.begin(), lpPerSocketContext->CurCon->SendData.begin() + BLOCKSIZE, buffSend.buf); // // a write operation has completed, determine if all the data intended to be // sent actually was sent. Loading Loading @@ -706,9 +716,13 @@ namespace netplus { delete lpAcceptSocketContext->CurCon->csock; lpAcceptSocketContext->CurCon->csock = nullptr; } break; } lpPerSocketContext->CurCon->SendData.resize(nRet); args->event->ResponseEvent(lpPerSocketContext->CurCon, tid, args); break; } } catch (NetException &e) { if (e.getErrorType() == NetException::Note || NetException::Warning) Loading Loading
src/event/iocp.cpp +18 −4 Original line number Diff line number Diff line Loading @@ -519,8 +519,6 @@ namespace netplus { INFINITE ); std::cout << "test2" << std::endl; lpIOContext = (poll::PPER_IO_CONTEXT)lpOverlapped; switch (lpIOContext->IOOperation) { Loading Loading @@ -615,7 +613,13 @@ namespace netplus { } args->event->ConnectEvent(lpPerSocketContext->CurCon, tid, args); std::copy(buffRecv.buf,buffRecv.buf+buffRecv.len,std::back_inserter(lpPerSocketContext->CurCon->RecvData)); args->event->RequestEvent(lpPerSocketContext->CurCon, tid, args); if(!lpPerSocketContext->CurCon->SendData.empty()) lpAcceptSocketContext->pIOContext->IOOperation = poll::ClientIoWrite; // //Time to post another outstanding AcceptEx // Loading Loading @@ -651,11 +655,17 @@ namespace netplus { delete lpAcceptSocketContext->CurCon->csock; lpAcceptSocketContext->CurCon->csock = nullptr; } std::copy(buffRecv.buf, buffRecv.buf + buffRecv.len, std::back_inserter(lpPerSocketContext->CurCon->RecvData)); args->event->RequestEvent(lpPerSocketContext->CurCon, tid, args); break; case poll::ClientIoWrite: std::copy(lpPerSocketContext->CurCon->SendData.begin(), lpPerSocketContext->CurCon->SendData.begin() + BLOCKSIZE, buffSend.buf); // // a write operation has completed, determine if all the data intended to be // sent actually was sent. Loading Loading @@ -706,9 +716,13 @@ namespace netplus { delete lpAcceptSocketContext->CurCon->csock; lpAcceptSocketContext->CurCon->csock = nullptr; } break; } lpPerSocketContext->CurCon->SendData.resize(nRet); args->event->ResponseEvent(lpPerSocketContext->CurCon, tid, args); break; } } catch (NetException &e) { if (e.getErrorType() == NetException::Note || NetException::Warning) Loading