exposing receiver thread ids to client (#102)

* exposing receiver thread ids to client

Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
Dhanya Thattil
2020-06-09 16:18:37 +02:00
committed by GitHub
parent 2a2bb5f63a
commit f5160b0978
48 changed files with 1151 additions and 580 deletions

View File

@ -289,7 +289,7 @@ template <typename Ret> Ret Module::sendToReceiver(int fnum) const {
<< sizeof(Ret) << "]";
Ret retval{};
sendToReceiver(fnum, nullptr, 0, &retval, sizeof(retval));
LOG(logDEBUG1) << "Got back: " << retval;
LOG(logDEBUG1) << "Got back: " << ToString(retval);
return retval;
}
@ -2614,6 +2614,11 @@ sls::IpAddr Module::getReceiverLastClientIP() const {
return sendToReceiver<sls::IpAddr>(F_GET_LAST_RECEIVER_CLIENT_IP);
}
std::array<pid_t, NUM_RX_THREAD_IDS> Module::getReceiverThreadIds() const {
return sendToReceiver<std::array<pid_t, NUM_RX_THREAD_IDS>>(
F_GET_RECEIVER_THREAD_IDS);
}
void Module::exitReceiver() {
LOG(logDEBUG1) << "Sending exit command to receiver server";
sendToReceiver(F_EXIT_RECEIVER, nullptr, nullptr);