This commit is contained in:
Erik Frojdh
2019-06-06 17:00:05 +02:00
parent fc5306f7cc
commit c86a1e7d48
11 changed files with 253 additions and 250 deletions

View File

@ -21,18 +21,4 @@ int ServerInterface2::sendResult(int ret, void *retval, int retvalSize,
return ret;
}
int ServerInterface2::receiveArg(void *arg, int sizeofArg) {
assert(sizeofArg > 0);
int bytes_read = receiveData(arg, sizeofArg);
if (bytes_read == sizeofArg) {
return defs::OK;
} else {
std::ostringstream ss;
ss << "TCP socket error read " << bytes_read << " bytes instead of "
<< sizeofArg << " bytes";
throw sls::SocketError(ss.str());
}
}
} // namespace sls