void apply(std::string key, const::Plugin::Common::Header &header) { for (int i = 0; i < header.hosts_size(); i++) { if (header.hosts(i).id() == key) { apply_host(header.hosts(i)); } } }
std::string operator() (const std::string channel, const Plugin::Common::Header &hdr, const Plugin::QueryResponseMessage::Response &payload) { std::string sender = hdr.sender_id(); for (int i=0;i<hdr.hosts_size();i++) { if (hdr.hosts(i).id() == sender) return hdr.hosts(i).host(); } return ""; }