mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 05:47:14 +02:00
exceptions TCP (#31)
* WIP * first test * format * test frames * also 0: * WIP * WIP * first test * format * test frames * also 0: * test and less local * pass ret by value * level * WIP * WIP * cleaning up interface * removed ref * another * updated api version * cleanup * cleanup * WIP * fixes * fixed tests
This commit is contained in:

committed by
Dhanya Thattil

parent
a6144f658e
commit
1db7521cfa
@ -70,11 +70,11 @@ int ClientSocket::sendCommandThenRead(int fnum, const void *args,
|
||||
|
||||
void ClientSocket::readReply(int &ret, void *retval, size_t retval_size) {
|
||||
|
||||
receiveData(&ret, sizeof(ret));
|
||||
read(&ret, sizeof(ret));
|
||||
if (ret == slsDetectorDefs::FAIL) {
|
||||
char mess[MAX_STR_LENGTH]{};
|
||||
// get error message
|
||||
receiveData(mess, sizeof(mess));
|
||||
read(mess, sizeof(mess));
|
||||
FILE_LOG(logERROR) << socketType << " returned error: " << mess;
|
||||
std::cout << "\n"; // needed to reset the color.
|
||||
|
||||
@ -89,7 +89,7 @@ void ClientSocket::readReply(int &ret, void *retval, size_t retval_size) {
|
||||
}
|
||||
}
|
||||
// get retval
|
||||
receiveData(retval, retval_size);
|
||||
read(retval, retval_size);
|
||||
}
|
||||
|
||||
}; // namespace sls
|
||||
|
Reference in New Issue
Block a user