26 boost::property_tree::ptree
const &cfg,
35 std::array<char, 4096> txt;
36 std::cin.getline(&txt[0], 4096);
37 std::string tmp(&txt[0]);
38 std::stringstream ss(tmp);
42 std::vector<std::string> cmds;
51 endpoints_[target] = std::shared_ptr<zmqpp::socket>(
52 new zmqpp::socket(
ctx_, zmqpp::socket_type::req));
53 endpoints_[target]->connect(
"inproc://" + target);
56 DEBUG(
"Read {" << std::string(&txt[0]) <<
"}, target = " << target);
65 static bool is_number(
const std::string &s)
67 return !s.empty() && std::find_if(s.begin(), s.end(), [](
char c) {
68 return !std::isdigit(c);
73 const std::vector<std::string> &cmds)
77 for (
const auto &str : cmds)
82 std::stringstream ss(str);
95 p.add(*target.get(), zmqpp::poller::poll_in);
98 WARN(
"No response from target (" << target <<
")");
107 INFO(
"response = " << rep);