int print_out_key(void *cls, enum MHD_ValueKind kind, const char *key, const char *value) { StringPairList* spl = (StringPairList*)cls; printf("%s: %s\n", key, value); if (spl != NULL) spl->push_back(StringPairList::value_type(key, value)); return MHD_YES; }
StringPairList ClientManager::getHubs(const CID& cid) const { Lock l(cs); StringPairList lst; auto op = onlineUsers.equal_range(cid); for(auto i = op.first; i != op.second; ++i) { lst.push_back(make_pair(i->second->getClient().getHubUrl(), i->second->getClient().getHubName())); } return lst; }