Exemplo n.º 1
0
		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));
				}
			}
		}
Exemplo n.º 2
0
	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 "";
	}