renamed ServerInterface

This commit is contained in:
Erik Frojdh
2020-02-04 08:57:35 +01:00
parent e6340456f6
commit ec66079f65
8 changed files with 88 additions and 88 deletions

View File

@ -0,0 +1,24 @@
#include "ServerInterface.h"
#include <cassert>
#include <cstring>
#include <sstream>
namespace sls {
int ServerInterface::sendResult(int ret, void *retval, int retvalSize,
char *mess) {
write(&ret, sizeof(ret));
if (ret == defs::FAIL) {
if (mess != nullptr) {
write(mess, MAX_STR_LENGTH);
} else {
FILE_LOG(logERROR) << "No error message provided for this "
"failure. Will mess up TCP\n";
}
} else {
write(retval, retvalSize);
}
return ret;
}
} // namespace sls