MCPcopy Create free account
hub / github.com/acl-dev/acl / lookup

Method lookup

lib_acl_cpp/src/stdlib/dns_service.cpp:179–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177#endif
178
179void dns_service::lookup(dns_result_callback* callback)
180{
181 std::list<dns_result_callback*>::iterator it;
182 const char* domain = callback->get_domain().c_str();
183
184 for (it= callbacks_.begin(); it != callbacks_.end(); ++it) {
185 if ((*it)->get_domain() == domain) {
186 callbacks_.push_back(callback);
187 return;
188 }
189 }
190
191 callbacks_.push_back(callback);
192
193 ipc_request* req = NEW dns_request(domain);
194
195 // ���û��� ipc_service �������
196 request(req);
197}
198
199void dns_service::on_result(const dns_res& res)
200{

Callers 5

test_get_oneFunction · 0.80
test_getFunction · 0.80
dict_lookupFunction · 0.80
mac_expand_callbackFunction · 0.80
mainFunction · 0.80

Calls 7

dns_requestClass · 0.85
requestFunction · 0.85
beginMethod · 0.80
c_strMethod · 0.45
get_domainMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by 2

test_get_oneFunction · 0.64
test_getFunction · 0.64