Commit 74caaf24 authored by jan.koester's avatar jan.koester
Browse files

test

parent 60c3f986
Loading
Loading
Loading
Loading
+8 −2
Changes for src/event/iocp.cpp: 8 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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)
@@ -290,7 +296,7 @@ namespace netplus {
							pClientContext->CurCon->csock->fd(), 
							&pClientContext->CurCon->csock->_Overlapped,
							&dwBytes, 
							false,
							true,
							(LPDWORD)&flags
						);

+2
Changes for src/windows/tcp.cpp: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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;
        }
    }