mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 06:47:14 +02:00
renamed ServerInterface
This commit is contained in:
24
slsSupportLib/src/ServerInterface.cpp
Normal file
24
slsSupportLib/src/ServerInterface.cpp
Normal 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
|
Reference in New Issue
Block a user