Commit e55b7f87 authored by jan.koester's avatar jan.koester
Browse files

fixed ret sizees

parent 3e8b4900
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ namespace netplus {

		SYSTEM_INFO sysinfo;
		GetSystemInfo(&sysinfo);
		threads = sysinfo.dwNumberOfProcessors;
		threads = 2;// sysinfo.dwNumberOfProcessors;
	}

	event::~event() {
@@ -251,8 +251,7 @@ namespace netplus {
					&pOverlapped,
					WSA_INFINITE);

				if (!eargs->mtx->try_lock())
					continue;
				eargs->mtx->lock();

				if (lpContext == 0) {
					eargs->mtx->unlock();
@@ -268,7 +267,7 @@ namespace netplus {
				}

				try {
					if (!((con*)pClientContext->CurCon)->SendData.empty()) {
					if (pClientContext->CurCon && !((con*)pClientContext->CurCon)->SendData.empty()) {

						dwFlags = 0;

@@ -284,9 +283,9 @@ namespace netplus {
						}
						catch (NetException& e) {
							std::cerr << e.what() << std::endl;

						}
					}
					else {
					} else {
						dwFlags = 0;

						std::shared_ptr<char[]> buf(new char[16384], std::default_delete<char[]>());
@@ -304,8 +303,8 @@ namespace netplus {
				catch (NetException& e) {
					std::cerr << e.what() << std::endl;
					eargs->evpoll->RemoveFromClientList(pClientContext);
					pClientContext = nullptr;
				}

				eargs->mtx->unlock();
			} // while
		}
+2 −2
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ size_t netplus::tcp::sendData(void* data, unsigned long size,int flags){
        throw exception;
    }

    return (size_t) rval;
    return (size_t) rval != 0 ? rval : size;
}


@@ -225,7 +225,7 @@ size_t netplus::tcp::recvData(void* data, unsigned long size,int flags){
                                       << " ErrorMsg: " <<  errstr;
        throw exception;
    }
    return (size_t)recvsize;
    return (size_t)recvsize != 0 ? recvsize : size;
}

void netplus::tcp::connect(socket *ssock){
+2 −2
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ SENDDATA:
                                       << " ErrorMsg: " << lerror;
        throw exception;
    }
    return (size_t) rval;
    return (size_t) rval != 0 ? rval : size;
}

size_t netplus::tcp::recvData(void* data, unsigned long size,int flags){
@@ -218,7 +218,7 @@ RECVDATA:
        throw exception;
    }

    return (size_t) recvsize;
    return (size_t) recvsize != 0 ? recvsize : size;
}

void netplus::tcp::connect(socket *ssock){