Loading src/event/iocp.cpp +18 Changes for src/event/iocp.cpp: 18 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -284,6 +284,24 @@ namespace netplus { std::shared_ptr<char[]> buf(new char[BLOCKSIZE], std::default_delete<char[]>()); size_t recv = pClientContext->CurCon->csock->recvData(buf.get(), BLOCKSIZE, 0); int flags=0; int rc = WSAGetOverlappedResult( pClientContext->CurCon->csock->fd(), &pClientContext->CurCon->csock->_Overlapped, &dwBytes, false, (LPDWORD)&flags ); if (rc == FALSE) { NetException exception; exception[NetException::Error] << "WSARecv operation failed with error: " << WSAGetLastError(); throw exception; } WSAResetEvent(pClientContext->CurCon->csock->_Overlapped.hEvent); pClientContext->CurCon->RecvData.append(buf.get(), recv); try { Loading src/windows/tcp.cpp −8 Changes for src/windows/tcp.cpp: 0 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -240,14 +240,6 @@ size_t netplus::tcp::recvData(void* data, unsigned long size,int flags){ } } int rc = WSAGetOverlappedResult(_Socket, &_Overlapped, &dwBytes, FALSE, (LPDWORD) &flags); if (rc == FALSE) { exception[NetException::Error] << "WSARecv operation failed with error: "<< WSAGetLastError(); throw exception; } WSAResetEvent(_Overlapped.hEvent); return (size_t) recvsize; } Loading Loading
src/event/iocp.cpp +18 Changes for src/event/iocp.cpp: 18 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -284,6 +284,24 @@ namespace netplus { std::shared_ptr<char[]> buf(new char[BLOCKSIZE], std::default_delete<char[]>()); size_t recv = pClientContext->CurCon->csock->recvData(buf.get(), BLOCKSIZE, 0); int flags=0; int rc = WSAGetOverlappedResult( pClientContext->CurCon->csock->fd(), &pClientContext->CurCon->csock->_Overlapped, &dwBytes, false, (LPDWORD)&flags ); if (rc == FALSE) { NetException exception; exception[NetException::Error] << "WSARecv operation failed with error: " << WSAGetLastError(); throw exception; } WSAResetEvent(pClientContext->CurCon->csock->_Overlapped.hEvent); pClientContext->CurCon->RecvData.append(buf.get(), recv); try { Loading
src/windows/tcp.cpp −8 Changes for src/windows/tcp.cpp: 0 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -240,14 +240,6 @@ size_t netplus::tcp::recvData(void* data, unsigned long size,int flags){ } } int rc = WSAGetOverlappedResult(_Socket, &_Overlapped, &dwBytes, FALSE, (LPDWORD) &flags); if (rc == FALSE) { exception[NetException::Error] << "WSARecv operation failed with error: "<< WSAGetLastError(); throw exception; } WSAResetEvent(_Overlapped.hEvent); return (size_t) recvsize; } Loading